#C11376. Sorting and Formatting Book IDs Catalogue

    ID: 40685 Type: Default 1000ms 256MiB

Sorting and Formatting Book IDs Catalogue

Sorting and Formatting Book IDs Catalogue

You are given a catalogue where each row contains a list of unique book IDs. Your task is to sort each row in ascending order and then format the entire catalogue so that each sorted row appears on a separate line with the numbers separated by a single space.

The input starts with an integer \( R \) (the number of rows), followed by \( R \) lines. Each line contains a series of space-separated integers representing book IDs.

Your output should contain \( R \) lines, with each line showing the sorted row.

inputFormat

The first line contains an integer \( R \), which represents the number of rows in the catalogue. Each of the following \( R \) lines contains a list of space-separated integers representing book IDs.

outputFormat

Output \( R \) lines. Each line should display the sorted book IDs (in ascending order) from the corresponding input row, with numbers separated by a single space.

## sample
3
5 1 3 9 7
2 4 6 8
1 0 -1
1 3 5 7 9

2 4 6 8 -1 0 1

</p>