package com.codegym.task.task10.task1019; import java.io.*; import java.util.HashMap; import java.util.Map; /* Functionality is not enough! */ public class Solution { static HashMap<String, Integer> map; static String name; static Integer id; public Solution(){ this.map = new HashMap<String, Integer>(); } public static void main(String[] args) throws IOException { Solution sol = new Solution(); BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); for(int i = 0; i < sol.map.size(); i++){ Integer id = Integer.parseInt(reader.readLine()); String name = reader.readLine(); if (name == "" || id == null )break; sol.map.put(name, id); } for(Map.Entry<String, Integer> pair: sol.map.entrySet()){ name = pair.getKey(); id = pair.getValue(); System.out.println(" Name=" + name + "Id=" + id ); } } }