Kris Kringle


Submit solution


Points: 1
Time limit: 1.0s
Memory limit: 256M

Authors:
Problem type
Allowed languages
C, C++, Java, Python

You are doing a Secret Santa with your friends, but you forgot who you were assigned to since you weren't paying attention! Luckily, you are giving your gift last. You can see all the gift exchanges that happen before you have to give your gift, and figure out who the recipient will be. Who should you give your gift to?

Note: it is not possible for someone to give a gift to themselves.

Input

The first line contains an integer n\ (1 \leq n \leq 10^4), detailing the number of gift exchanges that are going to happen before its your turn.

The next n lines each contain two space-separated strings. Each string is a name consisting of only upper or lowercase English characters with a length between 1 and 20 inclusive, indicating that the first person is giving their gift to the second person.

Output

Output the name of the person who you should give your gift to. They should be the only person who has not received a gift already when it is your turn.

Example

Input 1
3
Alice Bob
Bob Jerry
Charlie Alice
Output 1
Charlie
Input 2
4
James John
Alice James
Maged Bob
Bob Alice
Output 2
Maged

Comments

There are no comments at the moment.