Problem Description

It is the start of a new school year and Mr Panda is excited to start his final year of school leading up to his A-levels :D

As he enjoys the first few days of school reuniting with his friends and chatting about their wonderful endeavours during the holidays, his homework starts piling up rapidly and studying becomes a chore all over again. It's A-level year too for him and the teachers are not going to let him off that easily.

After the first few weeks, Mr Panda starts losing track of all the homework he needs to do as his desk becomes littered with loads of worksheets and notes. Having received many warnings from his teachers due to not handing in homework on time, he has sought your help in helping him keep track of all his homework. Help him code a program to track his deadlines within the year so he can hand up his homework on time.

Given a list of his N assignments, he wants to know which assignments he needs to complete first so he can prioritise his homework and not get scolded by his teachers anymore.


The input will consist of two lines.

The first line will contain N as defined above.

The second line will contain N integers, representing how many days he has left to the due date of each assignment.


The output should contain one line with N integers separate by a space each in the order which he should do his assignments. Refer to the sample test data if unsure. Note that there should NOT be a space after the last integer and there should be a newline at the end of your output.


Subtask 1(15%): 0 < N ≤ 1000

Subtask 2(30%): 0 < N ≤ 100000

Subtask 3(55%): 0 < N ≤ 3000000

Subtask 4(0%): Sample

Sample Input

3 6 3 1 9

Sample Output

1 3 3 6 9