выводит верно, в чем ошибка?
package com.javarush.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;
/*
Модернизация ПО
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
List<String> list = new ArrayList<>();
while (true) {
String family = reader.readLine();
if (family.isEmpty()) {
break;
}
list.add(family);
}
// Read the house number
String city = reader.readLine();
Map<String, String> map = new HashMap<>();
for (String s : list) {
map.put(city, s);
}
System.out.println(map.get(city));
}
}