что не так?
package com.javarush.task.task08.task0829;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.util.Map;
/*
Модернизация ПО
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
Map<String,String> map = new HashMap<String,String>();
while (true) {
String city = reader.readLine();
String family = reader.readLine();
if (family.isEmpty()||city.isEmpty()) {
break;
}
map.put(city,family);
}
// Read the house number
String cityEnter= reader.readLine();
Iterator<Map.Entry<String,String>> iter= map.entrySet().iterator();
while(iter.hasNext()){
Map.Entry<String,String>pair= iter.next();
String key= pair.getKey();
String value = pair.getValue();
if(key.contains(cityEnter)){
System.out.println(value);
}
}
}
}