???
package com.javarush.task.task08.task0829;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
/*
Модернизация ПО
*/
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<>();
while (true) {
String city = reader.readLine();
String family = reader.readLine();
if (city.isEmpty() || family.isEmpty()) break;
map.put(city, family);
}
//System.out.println(map); ---> just checked out if map is ok
// Read the city name
String city = reader.readLine();
//System.out.println(city); ---> and here I have a problem...
for (Map.Entry<String, String> pair : map.entrySet()){
String key = pair.getKey();
String value = pair.getValue();
if (city.equals(key))
{
System.out.println(value);
}
}
}
}