I don’t know what could be wrong
package pl.codegym.task.task10.task1019;
import java.io.*;
import java.util.HashMap;
import java.util.Map;
/*
Funkcjonalność to nie wszystko!
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
HashMap <String,Integer> mapa = new HashMap<>();
while (true){
int id = Integer.parseInt(reader.readLine());
String imie = reader.readLine();
if ( imie.isEmpty()){
// mapa.put("",id); // if he uses this code and comments on lines 19, the program is also invalid
for (Map.Entry<String, Integer> para : mapa.entrySet())
System.out.println(para.getValue() + " " + para.getKey());
System.out.println(id);
break; }
else { mapa.put(imie,id);}
}
}
}