Problem

6 /9


Synonyms

Problem

Synonym dictionary — describes synonymous series, that is, groups of words that have the same or fairly close meaning. The dictionary is often used synonymously by copywriters.
You have a dictionary consisting of pairs of synonymous words. All words in the dictionary are different. Output a synonym for the proposed word.

Input
The program receives as input the number of pairs of synonyms N. This is followed by N lines, each containing exactly two synonym words. The last N+1 line is followed by one word.

Imprint
Write a synonym for the given word.

Note
Use a dictionary in your program.
 


Examples
# Input Output
1 2
Dictionary Map 
List Array
Array
List