Почему вместо трех вводов, проводит только 2? куда делась Москва?
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;
/*
Модернизация ПО
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader rd = new BufferedReader(new InputStreamReader(System.in));
HashMap<String, String> adr = new HashMap<>();
for(;!((rd.readLine()).isEmpty());) {
System.out.println("Введите город и фамилию. Чтобы завершить ввод, нажмите Enter");
String a = rd.readLine();
String b = rd.readLine();
adr.put(a, b);
}
String city = rd.readLine();
System.out.println(adr.get(city));
}
}