Phone books were a common way to store the phone numbers of thousands of people before contacts and digital phones were available. Jake, unfortunately doesn't have access to a mobile phone. However, he does have phone book to store the names of all his friends, and their phone numbers.
Jake, being the popular guy at school, makes new friends very often. When he does so, he will obtain the phone number of his new friends, writing it down with their name. Unfortunately, Jake is lazy. He doesn't like updating his phone book, and he ESPECIALLY doesn't like searching through the phone book to determine the phone number of a friend when they have called him, as Jake is only shown a phone number when one of his friends calls him. Jake has helped you write a program to help him automate this system, adding people to his phone book and searching his phone book given a phone number to figure out who the caller is.
Jake's phone book starts off empty.
Input Specification
The first line of input will contain , the number of queries.
The following lines of input will contain 2 possible lines
1 a b
, which indicates adding person a with phone number b to the phone book.
2 a
, which requires you to print out the person with phone number a, or N/A
if no such person exists
All phone numbers in the program are to have 6 digits.
Output Specification
Print out a line for every time the second query is called, representing the person who possesses that phone number.
Sample Input 1
6
1 Jessica 123456
1 Janice 654321
1 Justin 928394
2 654321
1 Jorge 892347
2 892347
Sample Output 1
Janice
Jorge
Sample Input 2
8
1 Angelina 386782
1 Eric 587807
2 106628
2 587807
1 Joshua 497855
1 Luka 842307
2 386782
2 587807
Sample Output 2
N/A
Eric
Angelina
Eric
Comments