#K84437. Sort Arrays in Non-decreasing Order

    ID: 36419 Type: Default 1000ms 256MiB

Sort Arrays in Non-decreasing Order

Sort Arrays in Non-decreasing Order

You are given T test cases. For each test case, you are provided with an integer N and a list of N integers. The task is to sort each list in non-decreasing order.

In mathematical terms, for an array \(A = [a_1, a_2, \dots, a_N]\), you need to output a sorted array \(A'\) such that \(a'_1 \le a'_2 \le \dots \le a'_N\). The sorted arrays should be printed on separate lines with the numbers separated by a single space.

inputFormat

The first line of input contains an integer T indicating the number of test cases. For each test case, the first line contains an integer N denoting the number of elements in the array, and the second line contains N space-separated integers.

outputFormat

For each test case, output a single line with the sorted integers in non-decreasing order. Each element in a sorted array must be separated by a single space.

## sample
1
5
5 3 8 1 2
1 2 3 5 8