import java.io.*; import java.util.HashMap; /* Функциональности маловато! */ 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<>(); boolean b = true; while (b) { String s = reader.readLine(); int id; if (!s.isEmpty()) { id = Integer.parseInt(s); s = reader.readLine(); if (!s.isEmpty()) map.put(s, id); else { map.put(s, id); break; } } else break; } for (String i : map.keySet()) System.out.println("Id=" + map.get(i) + " Name=" + i); } }