Sorting numbers in ascending order
Go
Easy
sorting
Task «Sorting numbers in ascending order»
Write a program that reads a sequence of integers and outputs them in ascending order. The first line contains the number of integers n (1 ≤ n ≤ 1000). The second line contains n integers separated by spaces, each not exceeding 10^6 in absolute value. The program should sort the numbers in ascending order and output them separated by spaces.
Input Format
In the first line, an integer n. In the second line, n integers separated by spaces.
Output Format
One line with n numbers, sorted in ascending order, separated by a space.
Examples
Example 1
INPUT
100
OUTPUT
100
main.go