Олимпиадный тренинг

Задача 18694. Sequence Reverser-2


Задача

Темы:
Enter N number first, then N numbers. Output these N numbers in the following order: first all odd numbers are output in the order in which they occurred in the input file, and then all even ones.
 
Input
Enter N number (\(0<N<100\)) followed by N numbers . Each number does not exceed 100 modulo.
 
Output
Print N numbers in reverse order.

 
Examples
# Input Output
1
7
2 4 1 3 5 3 1
1 3 5 3 1 2 4