LearnPy Hub
← Arena
EasyRating 800

Gravity Flip

Columns of cubes stand in a box. When gravity pulls to the right, the cubes slide so the column heights end up sorted from small to large. Print the new heights.

Input

n, then n heights.

Output

n heights.

Sample 1

Input
4
3 2 1 2
Output
1 2 2 3

Sample 2

Input
3
2 3 8
Output
2 3 8
solution.py
Output appears here
Gravity Flip · Python Arena problem · LearnPy Hub