Forum#3922

Forum

1 second
64 megabytes
Easy

The Young Hackers Club has set up a forum on their website. The forum is structured such that each message either initiates a new topic or responds to an existing message within the same topic.

After several months of activity, the young hackers are curious to know which topic is the most popular on their forum. Your task is to help them determine this.

Input

The first line contains the integer , representing the number of messages on the forum (1 \leq N \leq 1000). The subsequent lines provide the details of each message in chronological order.

A message that begins a new topic is described by three lines. The first line contains the number . The second line provides the title of the topic, which is no longer than characters. The third line contains the message text.

A message that is a reply to another message is described by two lines. The first line contains an integer indicating the message number it is replying to. Messages are numbered starting from , and a reply always follows the message it responds to. The second line contains the message text.

Each message text is no longer than characters.

Output

Print the title of the topic that has the highest number of messages. If multiple topics have the same number of messages, print the title of the earliest one in chronological order.

Examples

Example 1

Loading
Loading