#C12817. Descending Order Sort

    ID: 42286 Type: Default 1000ms 256MiB

Descending Order Sort

Descending Order Sort

You are given a list of integers. Your task is to sort this list in descending order without using any built-in sorting functions. You need to implement the sorting algorithm manually (for example, using the bubble sort algorithm).

Input Format: The input is read from stdin. The first line contains an integer \(n\) which represents the number of elements in the list. The second line contains \(n\) space-separated integers.

Output Format: Print the sorted list in descending order as a single line of space-separated integers to stdout.

Constraints: \(0 \le n \le 1000\). If \(n = 0\), output an empty line.

inputFormat

The first line of input contains an integer \(n\), the number of elements in the list. The second line contains \(n\) space-separated integers.

outputFormat

Output a single line with the integers sorted in descending order, separated by a single space. If the list is empty, output nothing.

## sample
0