To celebrate the upcoming CCC (Canadian Computing Contest), Max decided to define a new sorting algorithm called Bob Sort.
Bob Sort involves
For the
If there are fewer than
Then, Bob Sort sorts the elements by their corresponding value
Can you Bob Sort the array into increasing order?
Constraints
All
Input Specification
The first line will contain
The next line will contain
Output Specification
Output
Note: Within a round, ties do not need to be broken between elements with the same value,
Sample Input 1
6
2 105 12 1 15 65
Sample Output 1
1 2 12 105 15 65
1 2 105 12 15 65
1 2 12 15 65 105
Sample Input 2
1
100
Sample Output 2
100
100
100
Comments
Stupid problem. Gives wrong answer for printing extra space after line.