#K74057. Reorder Students by Height

    ID: 34112 Type: Default 1000ms 256MiB

Reorder Students by Height

Reorder Students by Height

You are given a list of n students' heights. Your task is to reorder these heights so that each student is not shorter than the student immediately behind them. In other words, you need to output the list of heights in non-decreasing order.

This can be formulated as follows: Given an array \( A = [a_1, a_2, \dots, a_n] \), you must rearrange it such that \[ a_1 \le a_2 \le \dots \le a_n \] If the input is valid, print the reordered list. The input is given via standard input and the result should be printed on standard output.

inputFormat

The first line contains a single integer n representing the number of students. The second line contains n space-separated integers representing the heights of the students.

Input is provided via stdin.

outputFormat

Output the n heights in non-decreasing order, separated by a single space. The output should be printed via stdout.

## sample
5
3 1 4 3 2
1 2 3 3 4