не проходит по последнему пункту
package com.javarush.task.task08.task0829;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.util.List;
/*
Модернизация ПО
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
HashMap<String, String> map= new HashMap<>();
String city,surname,search;
while(true){
city=reader.readLine();
surname=reader.readLine();
map.put(city,surname);
if(city.isEmpty()){
break;
}
}
// Read the house number
search = reader.readLine();
for(Map.Entry<String,String> pair : map.entrySet()){
String key=pair.getKey();
String value=pair.getValue();
if(key.equals(search)){
System.out.println(value);
}
}
}
}