#P2173. cakes

cakes

there are some naughty little cakes(less than 1000), each cake has a numberthey stand in plates whose number start from 0 increasing in turn . The process of waiting for being taste by small Q is very boring so they made a game .According to the serial numbers of the cake from small to large lying on a plate ,but they forgot the plates that they lying before, if they don't go back, small Q will be very angry.So, smart programmer monkey  can you help them?

Input

Multiple sets of test data
first give you a digsit the number of cakes;
then there are n digsits

Output

。。。

Sample Input

4
4 2 1 3
5
4 3 1 2 5

Sample Output

2 1 3 0
2 3 1 0 4

HINT

maybe they are equal to others,if so ,printf the order before

Source