You are given an integer sequence of length n, a_1, ..., a_n. Let us consider performing the following n operations on an empty sequence b.  The i-th operation is as follows:    1. Append a_i to the end of b.   2. Reverse the order of the elements in b.  Find the sequence b obtained after these n operations.
# -*- coding:utf-8 -*-

def solve():
    n = int(input())
    A = input().split()

    

    # 1 2 3 -> 3 1 2
    b = []
    for i in range(1, n+1):
        if i%2 == 0:
            b.append(A[i-1])
        else:
            b.insert(0, A[i-1])

    print(b)

    if n%2 == 0:
        ans = ""
        for i in range(n-1, -1, -1):
            ans += b[i] + " "
        print(ans[:-1])
    else:
        ans = " ".join(b)
        print(ans)


if __name__ == "__main__":
    solve()

# -*- coding:utf-8 -*-
from collections import deque

def solve():
    n = int(input())
    A = input().split()

    

    # 1 2 3 -> 3 1 2
    b = deque()
    for i in range(1, n+1):
        if i%2 == 0:
            b.append(A[i-1])
        else:
            b.appendleft(A[i-1])

    if n%2 == 0:
        ans = ""
        for i in range(n-1, -1, -1):
            ans += b[i] + " "
        print(ans[:-1])
    else:
        ans = " ".join(b)
        print(ans)


if __name__ == "__main__":
    solve()
