Under construction

Still being built. Things may change

Sorting Numbers 4

Interview

Time limit2sMemory limit256 MB

Summary
Sort N distinct integers in descending order and print one per line.
Level

Easy3 of 10

Topics
Sorting
Solved
No attempts yet

Problem

You are given NN numbers. Write a program that sorts them in descending order.

Input

The first line contains the count of numbers, NN (1≤N≤1,000,0001 \le N \le 1{,}000{,}000). Each of the next NN lines contains one number to sort. Every number is an integer whose absolute value is at most 1,000,0001{,}000{,}000, and no number is given twice.

Output

Print the numbers in descending order over NN lines, one number per line.

Examples7

  1. Example 1

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

    Input
    1
    0
    
    Expected output
    0
    
  3. Example 3

    Input
    1
    -1000000
    
    Expected output
    -1000000
    
  4. Example 4

    Input
    3
    1000000
    -1000000
    0
    
    Expected output
    1000000
    0
    -1000000
    
  5. Example 5

    Input
    8
    -3
    7
    0
    -1000
    999
    -7
    42
    -999999
    
    Expected output
    999
    42
    7
    0
    -3
    -7
    -1000
    -999999
    
  6. Example 6

    Input
    5
    5
    4
    3
    2
    1
    
    Expected output
    5
    4
    3
    2
    1
    
  7. Example 7

    Input
    4
    -1000000
    -999999
    999999
    1000000
    
    Expected output
    1000000
    999999
    -999999
    -1000000