#CCBCHBAHAI0000107. Reverse-copy x sang y

Reverse-copy x sang y

Reverse-copy x into y

Source: Phuoc Hung OJ

Version: Phuoc Hung OJ Extended

Problem

Given a source array X=(x0,…,xn−1)X=(x_0,\ldots,x_{n-1}), construct a separate destination array YY without modifying XX, such that

∀i∈{0,…,n−1}:yi=xn−1−i.\forall i\in\{0,\ldots,n-1\}:\quad y_i=x_{n-1-i}.

This is reverse-copy: YY is the reverse of XX while XX remains unchanged.

Input

The first line contains nn. The second line contains XX.

Output

Print unchanged XX on the first line and reverse-copy YY on the second line.

Subtask

Subtask 1 (20 points): 1≤n≤101\le n\le10.

Subtask 2 (30 points): 1≤n≤1001\le n\le100.

Subtask 3 (50 points): 1≤n≤10001\le n\le1000.

Example

Input

5
3 1 4 1 5

Output

3 1 4 1 5
5 1 4 1 3

Explanation

Each destination index reads the symmetric source index.