jokes

One night, a number of N children (numbered from 1 to N) stand by a camp fire. The children say jokes but are very tired after the trips from that day and they slowly all fall asleep. The second day they all want to know in which order they fell asleep. Each child remembers exactly how many jokes of each of his colleagues he heard before going to sleep. The number of jokes heard by the children is stored in a square positive integer matrix A, having N lines and N columns, where A[i][j] represents the number of jokes told by child j which child i listened to before falling asleep.

Task

Write a program that determines in which order the children fell asleep.

Input Data

Line one of input file jokes.in contains positive integer N, representing the number of children that were at the camp fire. The following N lines, contain the elements of matrix A, one matrix line per input file line, values on the same line being separated by a space.

Output Data

Output file jokes.out contains on line one N positive integers representing the children, in the order in which they fell asleep.

Restrictions and Mentions

Example

jokes.in jokes.out Explanations
3
0 1 1
2 0 0
3 1 0
2 1 3 A possible sequence of events is:
- Child 1 tells a joke
- Child 2 tells a joke
- Child 1 tells a joke
- Child 2 falls asleep
- Child 3 tells a joke
- Child 1 tells a joke
- Child 1 falls asleep
- Child 3 falls asleep

Time limit: 0.5 seconds/test

prof. Carmen Popescu
"Gheorghe Lazar" Sibiu National High School
Contact: carmen_cngl@yahoo.com