#agc001f. [agc001_f]Wide Swap
[agc001_f]Wide Swap
Problem Statement
You are given a permutation of the set {, , ..., }.
You can apply the following operation to this permutation, any number of times (possibly zero):
- Choose two indices , such that and . Then, swap the values of and .
Among all permutations that can be obtained by applying this operation to the given permutation, find the lexicographically smallest one.
Constraints
- is a permutation of the set {, , ..., }.
Input
The input is given from Standard Input in the following format:
Output
Print the lexicographically smallest permutation that can be obtained.
Sample Input 1
Sample Output 1
One possible way to obtain the lexicographically smallest permutation is shown below: