?
package com.codegym.task.task10.task1019;
import java.io.*;
import java.util.*;
/*
Functionality is not enough!
*/
public class Solution
{
public static void main(String[] args) throws IOException
{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
HashMap<Integer,String> map = new HashMap<Integer,String>();
String name;
Integer num;
while(true)
{
String s = reader.readLine();
if(s.isEmpty()) break;
num = Integer.parseInt(s);
name = reader.readLine();
if(!map.containsValue(name))
map.put(num,name);
}
for(Map.Entry<Integer,String> pair : map.entrySet())
{
System.out.println(pair.getKey() + " " + pair.getValue());
}
}
}