Given a one-indexed array of
integers, you can perform the following operation an infinite number of times:
- Choose an index
and swap
and
.
Find the lexicographically smallest array after performing this operation any number of times.
Input Specification
The first line will contain the integer
, the number of elements.
The second line will contain integers,
, the elements of the array.
Output Specification
Output the lexicographically smallest array after performing the operation described above any number of times.
Sample Input
5
2 4 7 1 3
Sample Output
1 3 7 2 4
Comments