Problem Митинг ≡

Author:Виртуальная реальность   Time limit:2 sec
Input file:input.txt   Memory limit:256 Mb
Output file:output.txt  

Statement

The virtual student council has decided to hold a rally against freedom of speech. This raised the question of choosing a chairperson. The student council is full of people, yet there is no one to choose from. After deliberating, the virtual characters numbered themselves, and for the character numbered i defined the following numbers:

The larger the number, the higher the character's skill level in the corresponding field.

Character i is considered a candidate for chairperson if and only if there is no character j such that simultaneously mj > mi, pj > pi and tj > ti.

Write a program that compiles the list of candidates for chairperson.

Input file format

The input file contains a natural number n  — the number of characters. It is followed by n triples of natural numbers mi pi ti.

Output file format

Output to the output file the numbers of the selected characters in increasing order.

Constraints

1 ≤ n ≤ 105

1 ≤ mi, pi, ti ≤ 109

Sample tests

No. Input file (input.txt) Output file (output.txt)
1
4
2 3 4
1 1 3
2 1 8
3 2 10
1 4

0.036s 0.009s 15