help, please!
package com.codegym.task.task08.task0829;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.HashMap;
import java.util.Map;
/*
Software update
*/
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, String>();
while (true) {
String family = reader.readLine();
String city = reader.readLine();
if (family.isEmpty() || city.isEmpty()) break;
map.put(city, family);
}
String c = reader.readLine();
for(Map.Entry<String, String> pair : map.entrySet()){
if (c.equals(pair.getKey())){
System.out.println(pair.getValue());
}
}
}
}