The monthly salary of each employee is given. You need to find the salary of the employee corresponding to the incoming query.
The first line contains an integer indicating the number of employees. The next line of information is given in the surname and salary format.
Then an integer is given indicating the number of queries. After that, number of surnames are given.
For each query, print the salary of the employee with the given surname. If such an employee is not in the list, then print -1.
Example 1