A new video game is now on sale. In the world of this game, there are N monsters numbered from 0 to N −1. Each monster has an integer called its strength. The strength of the monster i (0 ≤ i ≤ N − 1) is Si. It is known that the strengths of the monsters satisfy the following conditions.
You can choose two monsters and make them fight each other. If the monster a and the monster b (0 ≤ a ≤ N − 1, 0 ≤ b ≤ N − 1, a , b) fight each other, the result of the fight is determined in the following way.
Regardless of the result of the fight, you can make the same monster fight as many times as you want.
You do not know the strengths of the monsters in the beginning. You want to know the strength of every monster. For this purpose, you can make the monsters fight at most 25 000 times, and you know the results of the fights. Moreover, you want to minimize the number of fights.
Write a program which, given the number of the monsters, calculates the strength of every monster by making the monsters fight each other several times.
The sample grader reads the following data from the standard input.
N
S0 · · · SN−1
When the program terminates successfully, the sample grader writes the following information to the standard output (quotes for clarity).
Query as “Accepted: 100”.Wrong Answer [1]”.If your program is judged as several types of Wrong Answer, the sample grader reports only one of them.