Sort Numbers

Time limit1sMemory limit128 MB

Summary
Read N integers and print them sorted in ascending order, one per line.
Level

Easy1 of 10

Topics
Sorting
Solved
No attempts yet

Problem

Given N integers, write a program that sorts them in ascending order.

Input

The first line contains the number of integers N (1 <= N <= 1,000). Each of the next N lines contains one integer. The absolute value of every integer is at most 1,000, and no two integers are the same.

Output

Print the sorted integers in ascending order, one per line.

Examples1

  1. Example 1

    Input
    5
    5
    2
    3
    4
    1
    
    Expected output
    1
    2
    3
    4
    5