14702 - Print out values in sequence   

Description

Write a program that prints a sequence according to odd and even positions.
The first line of input is the length n of the sequence, and the second line contains the numbers of the sequence.
The output has two lines: the first line contains the first, third, fifth, and so on numbers in the sequence, and the second line contains the second, fourth, sixth, and so on numbers.
There is a space between the numbers on the same line.

Input

First line: The length of the sequence. Ex. 5

Second line: The numbers of the sequence. Ex. 1 2 3 4 5

Output

The odd digits of the sequence. Ex. 1 3 5

The even digits of the sequence. Ex. 2 4

Each line ends with a blank space followed by a new line.

Sample Input  Download

Sample Output  Download

Tags

11410EE 231002



Discuss