#CCBCHBAHAI0000078. Concatenation of Array

Concatenation of Array

Concatenation of Array

Source: LeetCode

Version: Phuoc Hung OJ Extended

Problem

Given an integer array a0,a1,…,an−1a_0,a_1,\ldots,a_{n-1}, construct an array bb of length 2n2n by concatenating two copies of aa. For every 0≤i<n0\le i<n,

bi=ai,bi+n=ai.b_i=a_i,\qquad b_{i+n}=a_i.

Print bb.

Input

The first line contains nn. The second line contains nn integers aia_i.

Output

Print the 2n2n integers b0,b1,…,b2n−1b_0,b_1,\ldots,b_{2n-1} on one line.

Subtask

Subtask 1 (20 points): 1≤n≤101\le n\le10, 1≤ai≤10001\le a_i\le1000.

Subtask 2 (30 points): 1≤n≤1001\le n\le100, 1≤ai≤10001\le a_i\le1000.

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

Example

Input

4
1 3 2 1

Output

1 3 2 1 1 3 2 1

Explanation

The output follows directly from the mathematical definition above.