Magic Trick

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

Artem came to a circus, and now he is going to take part in the magic trick.

Artem secretly chooses permutation --- an array of nn distinct integers from 11 to nn. Let the chosen permutation be \[a_1,a_2,,a_n]\[a\_1, a\_2, \ldots, a\_n]. For every ii from 11 to nn Artem takes the set a_i,a_i+1,a_i+2\\{a\_i, a\_{i+1}, a\_{i+2}\\} (we assume that a_n+1=a_1a\_{n+1} = a\_1, a_n+2=a_2a\_{n+2} = a\_2).

He shuffles the elements of each set, and then shuffles the sets themselves. After that he  reports the resulting sets to the Magician.

You are that Magician. You need to figure out the permutation Artem has chosen.

입력

The first line contains an integer nn (3n200,0003 \le n \le 200\\,000), the number of elements in the permutation.

Each of the following nn lines contains three distinct integers a_i,1,a_i,2,a_i,3a\_{i,1}, a\_{i,2}, a\_{i,3} (1a_i,jn1 \le a\_{i,j} \le n), the sets that Artem has reported to the Magician.

It's guaranteed, that the Artem's sets correspond to at least one valid permutation.

출력

Print the permutation of nn elements Artem has secretly chosen.

If there are several possible permutations that can lead to the given sets of triples, print any suitable permutation.

힌트

In the second example, you can print any permutation of 11, 22 and 33.