Niebieskie ksi.eczki
II Olympiad in Informatics 1994/1995

Task: KOD
Author: Krzysztof Diks
The Coding of Permutations

III stage contest  

Every permutation A = (a1, ..., an) of numbers 1, ..., n can be coded by a sequence B = (b1, ..., bn) in which bi equals the number of all aj such that (j < i & aj > ai), for i = 1, ..., n.

Example

The sequence B = (0, 0, 1, 0, 2, 0, 4) is the code of the permutation A = (1, 5, 2, 6, 4, 7, 3).

Task

Write a program that:

Input

Output

The file KOD.OUT should contain:

Examples

For the file KOD.IN:
7
0
0
1
0
2
0
4
the file KOD.OUT should contain:
1
5
2
6
4
7
3

For the file KOD.IN:

4
0
2
0
0
the file KOD.OUT should contain:
NIE

Your program should look for the file KOD.IN in the current directory and create the file KOD.OUT also in the current directory. The source file containing the program written by you should be named KOD.???, where ??? are substituted by at most three-letter abbreviation of the programming language used. The same program in an executable form should be written in a file KOD.EXE.