Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
index = 0
result = []
if n % 2 == 0:
    for i in input().split():
        if index % 2 == 1:
            result.insert(0, i)
            index += 1
        else:
            result.append(i)
            index += 1
else:
    for i in input().split():
        if index % 2 == 1:
            result.append(i)
            index += 1
        else:
            result.insert(0, i)
            index += 1

print(" ".join(result))

Fixed submission:
from collections import deque

n = int(input())

result = deque()
index = 0

if n % 2 == 0:
    for i in input().split():
        if index % 2 == 1:
            result.appendleft(i)
            index += 1
        else:
            result.append(i)
            index += 1
else:
    for i in input().split():
        if index % 2 == 1:
            result.append(i)
            index += 1
        else:
            result.appendleft(i)
            index += 1

print(" ".join(result))

Buggy python submission (verdict: Runtime Error):
from collections import deque

n = int(input())

result = deque()
index = 0

if n % 2 == 0
    for i in input().split():
        if index % 2 == 1:
            result.appendleft(i)
            index += 1
        else:
            result.append(i)
            index += 1
else:
    for i in input().split():
        if index % 2 == 1:
            result.append(i)
            index += 1
        else:
            result.appendleft(i)
            index += 1

print(" ".join(result))

Fixed submission:
from collections import deque

n = int(input())

result = deque()
index = 0

if n % 2 == 0:
    for i in input().split():
        if index % 2 == 1:
            result.appendleft(i)
            index += 1
        else:
            result.append(i)
            index += 1
else:
    for i in input().split():
        if index % 2 == 1:
            result.append(i)
            index += 1
        else:
            result.appendleft(i)
            index += 1

print(" ".join(result))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

result = []

def cal(n, result):
    result.append(i)
    result = result[::-1]
    return result

for i in input().split():
    result = cal(i, result)

print(" ".join(result))

Fixed submission:
from collections import deque

n = int(input())

result = deque()
index = 0

if n % 2 == 0:
    for i in input().split():
        if index % 2 == 1:
            result.appendleft(i)
            index += 1
        else:
            result.append(i)
            index += 1
else:
    for i in input().split():
        if index % 2 == 1:
            result.append(i)
            index += 1
        else:
            result.appendleft(i)
            index += 1

print(" ".join(result))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

result = []

for i in input().split():
    result.append(i)
    result = result[::-1]

print(" ".join(result))

Fixed submission:
from collections import deque

n = int(input())

result = deque()
index = 0

if n % 2 == 0:
    for i in input().split():
        if index % 2 == 1:
            result.appendleft(i)
            index += 1
        else:
            result.append(i)
            index += 1
else:
    for i in input().split():
        if index % 2 == 1:
            result.append(i)
            index += 1
        else:
            result.appendleft(i)
            index += 1

print(" ".join(result))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
inuput_list = [int(i) for i in input().split()]

result = []

for i in inuput_list:
    result.append(str(i))
    result = result[::-1]

print(" ".join(result))

Fixed submission:
from collections import deque

n = int(input())

result = deque()
index = 0

if n % 2 == 0:
    for i in input().split():
        if index % 2 == 1:
            result.appendleft(i)
            index += 1
        else:
            result.append(i)
            index += 1
else:
    for i in input().split():
        if index % 2 == 1:
            result.append(i)
            index += 1
        else:
            result.appendleft(i)
            index += 1

print(" ".join(result))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
inuput_list = [int(i) for i in input().split()]

result = []

for i in inuput_list:
    result.append(i)
    result = result[::-1]

for i in result:
    print(str(i)+" " , end="")

Fixed submission:
from collections import deque

n = int(input())

result = deque()
index = 0

if n % 2 == 0:
    for i in input().split():
        if index % 2 == 1:
            result.appendleft(i)
            index += 1
        else:
            result.append(i)
            index += 1
else:
    for i in input().split():
        if index % 2 == 1:
            result.append(i)
            index += 1
        else:
            result.appendleft(i)
            index += 1

print(" ".join(result))