1036 倒置排序


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

将一些整数按倒置值排序后输出. 所谓倒置,是指把整数各位倒过来构成一个新数,例如:13倒置成了31.

Input

第一行的整数N表示后面列出的组数。 每组数的第一个整数n表示后面将有n个整数(整数均在int范围内)。(每组数据量不超80)

Output

将每组数按倒置值进行排序输出.其每组数的结果占一行.行末无空格.

Sample

Input

2
4 83 13 24 36
4 99 100 123 12345

Output

13 83 24 36
100 99 123 12345

Source: qn


Comments

There are no comments at the moment.