LearnPy Hub
← Arena
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
solution.py
Output appears here
Three Colours · Python Arena problem · LearnPy Hub