Buggy python submission (verdict: Runtime Error):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

i_i = lambda: int(i_s())
i_l = lambda: list(map(int, stdin.readline().split()))
i_s = lambda: stdin.readline().rstrip()

n = i_i()
a = i_l()

print(*a[::-2],*a[n%2::2])



Fixed submission:
from collections import deque

n = int(input())
a = list(map(int, input().split()))

d = deque()
for i in range(n):
    if i % 2 != 0:
        d.append(a[i])
    else:
        d.appendleft(a[i])

if n % 2 == 0:
    print(*list(reversed(d)))
else:
    print(*d)

Buggy python submission (verdict: Runtime Error):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

i_i = lambda: int(i_s())
i_l = lambda: list(map(int, stdin.readline().split()))
i_s = lambda: stdin.readline().rstrip()

n = i_i()
a = i_l()
print(*a[::-2],*a[n%2::2])



Fixed submission:
from collections import deque

n = int(input())
a = list(map(int, input().split()))

d = deque()
for i in range(n):
    if i % 2 != 0:
        d.append(a[i])
    else:
        d.appendleft(a[i])

if n % 2 == 0:
    print(*list(reversed(d)))
else:
    print(*d)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)
from collections import deque

i_i = lambda: int(i_s())
i_l = lambda: list(map(int, stdin.readline().split()))
i_s = lambda: stdin.readline().rstrip()

n = i_i()
a = i_l()

d = deque([a[0]])

for x in a[1:]:
    d.append(x)
    d.reverse()

print(*d)


Fixed submission:
from collections import deque

n = int(input())
a = list(map(int, input().split()))

d = deque()
for i in range(n):
    if i % 2 != 0:
        d.append(a[i])
    else:
        d.appendleft(a[i])

if n % 2 == 0:
    print(*list(reversed(d)))
else:
    print(*d)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))

if len(a) % 2 == 0:
    print(*list(reversed(a[1::2])), *a[0::2])
else:
    print(*list(reversed(a[0::2])), *a[1::2])


Fixed submission:
from collections import deque

n = int(input())
a = list(map(int, input().split()))

d = deque()
for i in range(n):
    if i % 2 != 0:
        d.append(a[i])
    else:
        d.appendleft(a[i])

if n % 2 == 0:
    print(*list(reversed(d)))
else:
    print(*d)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))

if len(a) % 2 == 0:
    print(*reversed(a[1::2]), *a[0::2])
else:
    print(*reversed(a[0::2]), *a[1::2])


Fixed submission:
from collections import deque

n = int(input())
a = list(map(int, input().split()))

d = deque()
for i in range(n):
    if i % 2 != 0:
        d.append(a[i])
    else:
        d.appendleft(a[i])

if n % 2 == 0:
    print(*list(reversed(d)))
else:
    print(*d)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))

if len(a) % 2 == 0:
    print(*reversed(a[1::2]), *a[0::2])
else:
    print(*reversed(a[0::2]), *a[1::2])


Fixed submission:
from collections import deque

n = int(input())
a = list(map(int, input().split()))

d = deque()
for i in range(n):
    if i % 2 != 0:
        d.append(a[i])
    else:
        d.appendleft(a[i])

if n % 2 == 0:
    print(*list(reversed(d)))
else:
    print(*d)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))

arr = []
for x in a:
    arr.append(x)
    arr.reverse()

print(*arr)


Fixed submission:
from collections import deque

n = int(input())
a = list(map(int, input().split()))

d = deque()
for i in range(n):
    if i % 2 != 0:
        d.append(a[i])
    else:
        d.appendleft(a[i])

if n % 2 == 0:
    print(*list(reversed(d)))
else:
    print(*d)