что не так?
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<>();
List<String> list2 = new ArrayList<>();
int i = 0;
while (true) {
String family = reader.readLine();
if (family.isEmpty()) {
break;
}
if(i%2==0)
list.add(family);
else
list2.add(family);
i++;
}
// System.out.print(list.size());
HashMap<String, String> map = new HashMap<>();
for(int b = 0; b < 3; b++) {
map.put(list.get(b), list2.get(b));
}
String city = reader.readLine();
System.out.println(map.get(city));
}
}