Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
ARR = [int(s) for s in input().split(" ")]
def calculate(n,arr):

    left = list([])
    right = list([])
    if n % 2 == 0:
        for index,ar in enumerate(arr):
            if index % 2 == 0:
                right.append(str(ar))
            else:
                left.insert(0,str(ar))
    else:
        for index,ar in enumerate(arr):
            if index % 2 == 0:
                left.insert(0,str(ar))
            else:
                right.append(str(ar))
    left.extend(right)

    return left

result = calculate(N,ARR)
print(" ".join(result))

Fixed submission:
N = int(input())
ARR = [int(s) for s in input().split(" ")]
def calculate(n,arr):

    left = list([])
    right = list([])
    if n % 2 == 0:
        for index,ar in enumerate(arr):
            if index % 2 == 0:
                right.append(str(ar))
            else:
                left.append(str(ar))
    else:
        for index,ar in enumerate(arr):
            if index % 2 == 0:
                left.append(str(ar))
            else:
                right.append(str(ar))

    left.reverse()
    left.extend(right)

    return left

result = calculate(N,ARR)
print(" ".join(result))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
ARR = [int(s) for s in input().split(" ")]
def calculate(n,arr):

    result = list([])
    if n % 2 == 0:
        for index,ar in enumerate(arr):
            if index % 2 == 0:
                result.append(str(ar))
            else:
                result.insert(0,str(ar))
    else:
        for index,ar in enumerate(arr):
            if index % 2 == 0:
                result.insert(0,str(ar))
            else:
                result.append(str(ar))

    return result

result = calculate(N,ARR)
print(" ".join(result))

Fixed submission:
N = int(input())
ARR = [int(s) for s in input().split(" ")]
def calculate(n,arr):

    left = list([])
    right = list([])
    if n % 2 == 0:
        for index,ar in enumerate(arr):
            if index % 2 == 0:
                right.append(str(ar))
            else:
                left.append(str(ar))
    else:
        for index,ar in enumerate(arr):
            if index % 2 == 0:
                left.append(str(ar))
            else:
                right.append(str(ar))

    left.reverse()
    left.extend(right)

    return left

result = calculate(N,ARR)
print(" ".join(result))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
ARR = [int(s) for s in input().split(" ")]
def calculate(n,arr):
    result = ""
    if n % 2 == 0:
        for index,ar in enumerate(arr):
            if index % 2 == 0:
                if result == "":
                    result = result + str(ar)
                else:
                    result = result + " " + str(ar)
            else:
                if result == "":
                    result = str(ar) + result
                else:
                    result = str(ar) + " " + result
    else:
        for index,ar in enumerate(arr):
            if index % 2 == 0:
                if result == "":
                    result = str(ar) + result
                else:
                    result = str(ar) + " " + result
            else:
                if result == "":
                    result = result + str(ar)
                else:
                    result = result + " " + str(ar)




    return result

result = calculate(N,ARR)
print(result)

Fixed submission:
N = int(input())
ARR = [int(s) for s in input().split(" ")]
def calculate(n,arr):

    left = list([])
    right = list([])
    if n % 2 == 0:
        for index,ar in enumerate(arr):
            if index % 2 == 0:
                right.append(str(ar))
            else:
                left.append(str(ar))
    else:
        for index,ar in enumerate(arr):
            if index % 2 == 0:
                left.append(str(ar))
            else:
                right.append(str(ar))

    left.reverse()
    left.extend(right)

    return left

result = calculate(N,ARR)
print(" ".join(result))