в чем проблема ?
package com.javarush.task.task10.task1019;
import java.util.*;
import java.io.*;
/*
Функциональности маловато!
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
HashMap<String, Integer> map = new HashMap<>();
while (true){
String number= reader.readLine();
String strok = reader.readLine();
if(number.isEmpty()) {
break;
}
else if (strok.isEmpty()){
break;
}
else{
int num = Integer.parseInt(number);
map.put(strok, num);
}
}
for(Map.Entry<String, Integer>pair: map.entrySet()){
System.out.println(pair.getKey()+""+pair.getValue());
}
}
}