D. D.这才是真正的签到题哈

    Type: Default 1000ms 256MiB

D.这才是真正的签到题哈

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

小朋友会有n组数,希望你能将奇数偶数有序(按从大到小)排列,并且保证奇数要在偶数后面。嗯,挺简单的。

Input

第一排输入一个N(1<=N<=200),接下来会有N 组数据,每一组数据都是遇到0就结束(数据个数1e 6),保证数字范围在1<=x<=1000。

Output

对于每一组样例,依次输出排列好的偶数和奇数,数与数之间有空格,最后一个数字不能有多余的空格。

Samples

3
11 43 56 22 9 0
1 2 3 5 7 9 2 0
67 456 78 45 89 0
56 22 43 11 9
2 2 9 7 5 3 1
456 78 89 67 45

Limitation

1s, 1024KiB for each test case.

SWPU ROUND #1 (DIV.3)

Not Attended
Status
Done
Rule
IOI
Problem
6
Start at
2021-11-7 9:00
End at
2021-11-7 11:30
Duration
2.5 hour(s)
Host
Partic.
28