#T49. 整数奇偶排序

整数奇偶排序

Description

给出n个整数,现在要求你将其中的奇数按升序排序,偶数按降序排序,最后先输出奇数,再输出偶数

Format

Input

第一行一个整数n(n1000)n(n\leq1000)
第二行n个整数

Output

一行,先输出升序的奇数,再输出降序的偶数

Samples

10
2 7 4 5 10 3 8 9 6 1
1 3 5 7 9 10 8 6 4 2

Limitation

1s, 1024KiB for each test case.