Warm-up#1160

Warm-up

1 segundo
64 megabytes
Muy fácil

Find the pair of numbers according to the specified criteria.

Entrada

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 .

Salida

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 .

Ejemplos

Ejemplo 1

Loading
Loading