IntermediateRating 1200
Three Colours
The array contains only 0, 1 and 2. Sort it in one pass without using sort().
Input
n, then n values.
Output
One line.
Sample 1
Input
6 2 0 2 1 1 0
Output
0 0 1 1 2 2
Sample 2
Input
1 1
Output
1
Output appears here