Find the pair of numbers according to the specified criteria.
The input file first contains the number (1 \leq N \leq 100), followed by pairs of numbers. The first number in each pair is a natural number not exceeding . The second number in each pair is either or .
You are required to find and output the number (index) of the pair in which the second number is and, among all such pairs, the one with the largest first number (if there are several such pairs, output the first one). If there are no pairs in which the second number is , output .
Example 1