Problem:


Reversing Numbers

  Write a program which reads a sequence and prints it in the reverse order.

Input

The input is given in the following format:

n
a1 a2 . . . an

n is the size of the sequence and ai is the ith element of the sequence.

Output

  Print the reversed sequence in a line. Print a single space character between adjacent elements (Note that your program should not put a space character after the last element).

Constraints

n ≤ 100

0 ≤ ai < 1000

Sample Input 1

5
1 2 3 4 5

Sample Output 1

5 4 3 2 1

Sample Input 2

8
3 3 4 4 5 8 7 9

Sample Output 2

9 7 8 5 4 4 3 3

Note

      解説      

	



Sample input:
5
1 2 3 4 5


Sample output:
5 4 3 2 1

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
for i in range(n-1,0,-1):
    print("%d "%a[i],end="")
print(a[0])

Submission status: Accepted

Solution code:
input()
seqA = list(map(int, input().split(' ')))
print(str(seqA[::-1]).replace("[","").replace("]","").replace(",",""))

Submission status: Accepted

Solution code:
n = int(input())
num = list(map(int, input().split()))
tmp = 0
if n%2 == 0:#偶数はn/2回swap
    for i in range(n//2):
        tmp = num[i]
        num[i] = num[-(i+1)]
        num[-(i+1)] = tmp


else:#奇数はn//2回swap
    for i in range(n//2):
        tmp = num[i]
        num[i] = num[-(i+1)]
        num[-(i+1)] = tmp

print(" ".join(map(str, num)))

Submission status: Accepted

Solution code:
input()
print(*reversed(input().split()))

Submission status: Accepted

Solution code:
i = int(input())
lst = (input().split())
lst.reverse()
for i in range(i):
	if i >= 1:
		print(" ", end = '')
	print(lst[i], end = '')
print()

Submission status: Accepted

Solution code:
n = int(input())
a = input().split()
c = 1
for i in (reversed(a)):
    if(c != n):
        print("{} ".format(i), end = "")
    else:
        print(i)
    c += 1

Submission status: Accepted

Solution code:
line1 = int(input())
line2 = list(map(int,input().split()))
i =line1-1
while i >=0 :
    if i>0:
        print(line2[i],end=" ")
    else:
        print(line2[i],end="")
    i = i-1
print()

Submission status: Accepted

Solution code:
a = int(input())
b = input().split()
b.reverse()
c = (" ").join(b)
print (c)

Submission status: Accepted

Solution code:
length=int(input())
n=input().split()
for i in range(length):
    if i<length-1:
        print(n.pop(),end=' ')
    else:
        print(n.pop())

Submission status: Accepted

Solution code:
a = int(input())
list=list(map(int, input().split()))
list.reverse()
for i in range(a-1):
    print(str(list[i])+" ",end="")
print(list[a-1])

Submission status: Accepted

Solution code:
n = int(input())
l = [0]*n
l = list(map(int,input().split()))

for i in range(len(l) // 2):
        l[i],l[-1-i] = l[-1-i],l[i]

print(" ".join(list(map(str,l))))

Submission status: Accepted

Solution code:
n=int(input())
print(*list(map(int,input().split()))[::-1])

Submission status: Accepted

Solution code:
N = int(input())
l=list(map(int, input().split()))
for i in range(N):
    s=N-i-1
    print(l[s],end="")
    if  not i==N-1:
        print(" ",end="")
print()

Submission status: Accepted

Solution code:
n = int(input())
print(" ".join([a for a in input().split()][::-1]))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
a = list(map(int, input().split()))
b = []
for i in range(1, len(a)+1):
    b.append(a[-i])
print(*b)

Submission status: Accepted

Solution code:
#数列の反転

N = int(input())
li = input().split()
li.reverse()
print(*li)

Submission status: Accepted

Solution code:
n = int(input())
table = list(map(int, input().split()))
table.reverse()

for i in range(n - 1):
	print(table[i], end=' ')
print(table[-1])

Submission status: Accepted

Solution code:
int(input())
table = list(map(int, input().split()))
table.reverse()
print(" ".join(map(str, table)))

Submission status: Accepted

Solution code:
N = int(input())
table = list(map(int,input().split()))
table.reverse()

ls = table

print(' '.join(map(str,ls)))

Submission status: Accepted

Solution code:
n = int(input())
list = list(map(int, input().split()))
list.reverse()

# joinで半角スペースで結合して出力
# print(" ".join(map(str, list)))

# enumerate関数でインデックスとその値を取得する
for i, elem in enumerate(list):
    if i > 0:
        print(" ", end="")
    print(elem, end="")
print()

Submission status: Accepted

Solution code:
n = int(input())
numbers = list(map(int, input().split()))
numbers.reverse()

print(' '.join(map(str, numbers)))

Submission status: Accepted

Solution code:
import sys
import math
N=int(input())
L=list(map(int,input().split()))
L.reverse()
print(' '.join(map(str,L)))

Submission status: Accepted

Solution code:
n = input()
l = input().split()
print(' '.join(reversed(l)))

Submission status: Accepted

Solution code:
N = int(input())
l = list(map(int, input().split()))
l.reverse()
print(" ".join(map(str,l)))

Submission status: Accepted

Solution code:
n = input()
s = input().split()
ans = []
for i in s:
    ans.insert(0,i)
print(" ".join(ans))

Submission status: Accepted

Solution code:
n = int(input())
lis = list(map(int,input().split()))
lis.reverse()
print(" ".join(map(str,lis)))

Submission status: Accepted

Solution code:
_ = input()
print(*input().split()[::-1])

Submission status: Accepted

Solution code:
n = input()
nums = list(map(int, input().split()))
nums.reverse()
for i, num in enumerate(nums):
    if i == 0:
        print(num, end="")
    elif i > 0:
        print(" {}".format(num), end="")
print()

Submission status: Accepted

Solution code:
n = int(input())
a = []
a[0:n] = list(map(int, input().split()))

A = ""
for i in range(n):
    A = A + str(a[n-i-1]) + " "

print(A[:-1])

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
rev = a[::-1]
rev = [str(i) for i in rev]
print(" ".join(rev))

Submission status: Accepted

Solution code:
N = int(input())

list1 = list(map(int, input().split()))

list1.reverse()

for n in range(N):
    if n == N - 1:
        print(list1[n], end="")
    else:
        print(list1[n], end=" ")
print()

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int, input().split()))
b=[]
for i in range(0,n):
    b.append(a[n-i-1])
result=" ".join(str(m) for m in b)
print(result)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
a.reverse()
print(*a)

Submission status: Accepted

Solution code:
n = int(input())
ai = list(map(int,input().split()))
ai.reverse()
print(' ' .join(map(str,ai)))

Submission status: Accepted

Solution code:
n=input()
a=[x for x in input().split()]
a.reverse()
print(' '.join(a))

Submission status: Accepted

Solution code:
N = int(input())
A = input().split()
print(*A[::-1])

Submission status: Accepted

Solution code:
n = input()
a =input().split()
a.reverse()
print(' '.join(a))

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
a = a[::-1]
print(*a)

Submission status: Accepted

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

for i in reversed(range(n)):
    if i == 0:
        print(a[i])
    else:
        print(a[i], end=" ")

Submission status: Accepted

Solution code:
input()
arr = input().split()
print(' '.join(reversed(arr)))

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(int,input().split()))
l.reverse()
for i in range(n):
    if i==n-1 : print(l[i])
    else : print(l[i],end=" ")

Submission status: Accepted

Solution code:
n = int(input())
num_list = list(map(int,input().split()))
num_list.reverse()

print(' '.join(map(str,num_list)))

Submission status: Accepted

Solution code:
n = int(input())
table = [int(text) for text in input().split()]
table.reverse()

print(" ".join(map(str, table)))

Submission status: Accepted

Solution code:
n = int(input())
nums = input().split()
nums.reverse()
print(' '.join(nums))

Submission status: Accepted

Solution code:
n = int(input())
listA = input().split(" ")
listA.reverse()
print(" ".join(listA))

Submission status: Accepted

Solution code:
n = int(input())
a = [int(x) for x in input().split()]
print(*a[::-1])

Submission status: Accepted

Solution code:
n=input()
list=list(map(int, input().split()))
print(*list[::-1])

Submission status: Accepted

Solution code:
n = int(input(""))
a = list(map(int, input().split()))

a.reverse()

print(" ".join(map(str, a)))

Submission status: Accepted

Solution code:
_ = input()
a = list(map(int, input().split()))
b = list(reversed(a))
for i in range(len(b)):
    if i == len(b)-1:
        print(b[i])
    else:
        print(f'{b[i]} ', end='')

Submission status: Accepted

Solution code:
n = int(input())
print(' '.join(map(str, reversed(list(map(int,input().split()))))))

Submission status: Accepted

Solution code:
z = int(input())
a = list(map(int,input().split()))
a.reverse()
print(" ".join(map(str,a)))

Submission status: Accepted

Solution code:
n=int(input())
li = list(map(int, input().split()))
li.reverse()
print(" ".join(map(str, li)))

Submission status: Accepted

Solution code:
n = int(input())
li = list(map(int,input().split()))

for i in range(1,n+1):
    if i == 1:
        print(str(li[-i]), end="")
        continue
    print(" " + str(li[-i]), end="")
print()

Submission status: Accepted

Solution code:
n = int(input())
number = [int(i) for i in input().split()]

for i in reversed(number):
    if i == number[0]:
        print(i, end="")
    else:
        print(i, end=" ")
print()

Submission status: Accepted

Solution code:
n=int(input())
l=[i for i in input().split()]
l.reverse()
print(" ".join(l))

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
a.reverse()
print (' '.join(map(str,a)))

Submission status: Accepted

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

print(' '.join(list(map(str, reversed(a)))))

Submission status: Accepted

Solution code:
import math
import copy
from copy import deepcopy
import sys
import fractions
# import numpy as np
from functools import reduce
# import statistics
import decimal
import heapq
import collections
import itertools
sys.setrecursionlimit(100001)

# input = sys.stdin.readline
# sys.setrecursionlimit(10**6)

# ===FUNCTION===

def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList


# ===CODE===

n = int(input())
d = getInputListInt()

d.reverse()

print(*d, sep=" ")

Submission status: Accepted

Solution code:
num = int(input())
s = input().rstrip().split(' ')
s.reverse()
ans = ""
for i in range(num-1):
 ans += str(s[i]) + " "
ans += s[num-1]
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
S = list(map(int,input().split()))
S.reverse()
print(" ".join(map(str,S)))

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
a.reverse()
for i in range(n):
    if i != n - 1:
        print(a[i],end = ' ')
    else:
        print(a[i])

Submission status: Accepted

Solution code:
n = int(input())
an = [int(x) for x in input().split()]
an.reverse()
print(" ".join(map(str, an)))

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int, input().split()))
for i in reversed(a):
    if i==a[0]:
        print(i)
    else:
        print(i, end=" ")

Submission status: Accepted

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

a.reverse()


print(" ".join(map(str,a)))

Submission status: Accepted

Solution code:
#2020-03-18
#print(" ".join(map(str,list)))
a = input()
lst = input().split()
print(*reversed(lst))

Submission status: Accepted

Solution code:
n = int(input())
an = list(map(int, input().split()))
an.reverse()
print(" ".join(map(str, an)))

Submission status: Accepted

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

a.reverse()
print(" ".join(map(str,a)))

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
c=[]
for i in range(n):
   c.append(a[n-1-i]) 
print(*c)

Submission status: Accepted

Solution code:
N = input()
A = list(map(int, input().split()))

print(*A[::-1])

Submission status: Accepted

Solution code:
N = int(input())
table = list(map(int,input().split()))
table.reverse()


print((' '.join(map(str,table))))

Submission status: Accepted

Solution code:
import bisect,collections,copy,itertools,math,string
def I(): return int(input())
def F(): return float(input())
def S(): return input()
def LI(): return list(map(int,input().split()))
##################################################
def main(N,A):
    A.reverse()
    return A
    
N = I()
A = LI()
print(*main(N,A))

Submission status: Accepted

Solution code:
n = input()
l=list(map(int, input().split()))
l=l[::-1]

for i in l:
  if i != l[-1]:
    print("{} ".format(i), end='')
  else:
    print("{}".format(i))

Submission status: Accepted

Solution code:
n=int(input())
x=list(map(int,input().split()))
a=[]
for i in (reversed(x)):
	a.append(i)
print(' '.join(map(str,a)))

Submission status: Accepted

Solution code:
n=int(input())
num=list(map(int, input().split()))
cnt=0
for c in range(n):
  print("{}".format(num[n-c-1]),end="")
  cnt+=1
  if cnt != n:
    print(" ",end="")
print()

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))[::-1]
ans = ""
for nn in range(n):
    ans += str(a[nn])+" "

print(ans[:-1])

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
lst = []
for i in range(n):
    lst.append(a[(n - 1) - i])

print(*lst)

Submission status: Accepted

Solution code:
n = int(input())
lis = list(map(int, input().split()))

for i in range(n):
    if i != 0:
        print(" ", end = "")
    else:
        pass
    print(lis[n-1-i], end = "")

print()

Submission status: Accepted

Solution code:
n = input()
L = reversed(input().split())
print(' '.join(L))

Submission status: Accepted

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

for i in range(1,n+1):
    if i!=1:
        print(' ',end='')
    print(a[-i],end='')
print()

Submission status: Accepted

Solution code:
n=int(input())
lst=list(map(int,input().split()))
lst.reverse()

for num,i in enumerate(lst):
  if num==n-1:
      print(i,end='')
  else:
      print(i,end=' ')
print()

Submission status: Accepted

Solution code:
# 数列の反転

# input process
n = int(input())
a_list = input().split()

# output process
print(" ".join(a_list[::-1]))

Submission status: Accepted

Solution code:
a = int(input())
l = list(map(int, input().split()))

l.reverse()

print(*l)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
for i in range(n - 1, 0, -1):
    print(a[i], "", end = "")
print(a[0])

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
ans = ""
a.reverse()
for i in a:
  ans += str(i) +  " "
print(ans.rstrip(" "))

Submission status: Accepted

Solution code:
sequence_size = int(input())

input_value = input()

sequence = list(map(int, input_value.split()))

reversed_sequence = list(reversed(sequence))

reversed_sequence_str = list(map(str, reversed_sequence))

print(' '.join(reversed_sequence_str))

Submission status: Accepted

Solution code:
a = int(input())
b = [i for i in input().split()]
print(' '.join(reversed(b)))

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
a.reverse()
print(" ".join(map(str,a)))

Submission status: Accepted

Solution code:
a = input()
b = list(map(int, input().split()))

print(" ".join(map(str,b[::-1])))

Submission status: Accepted

Solution code:

n = input()

Sequence = list(map(int, input().split()))

Sequence.reverse()

print(" ".join(map(str, Sequence)))


#for i, elem in enumerate(Sequence):
#  if i > 0 and i < n:
#    print(" ", end = "")
#  print(elem, end = "")
#print()

Submission status: Accepted

Solution code:
_ = input()
print(*(input().split())[::-1])

Submission status: Accepted

Solution code:
n = int(input())
numbers = list(map(int, input().split()))
numbers.reverse()
for i in range(len(numbers)):
    if i == len(numbers)-1:
        print(numbers[i])
    else:
        print(numbers[i], end=" ")

Submission status: Accepted

Solution code:
n = int(input())

a = list(map(int,input().split()))[:n]
aRev = a[::-1]

print(*aRev, sep=" ")

Submission status: Accepted

Solution code:
n = int(input())
print(" ".join(map(str, input().split()[::-1])))

Submission status: Accepted

Solution code:
n = int(input())
lst = list(map(int, input().split( )))
lst.reverse()

for i, elem in enumerate(lst):
    if i > 0:
        print(" ", end = "")   
    print(elem, end = "")
print()

Submission status: Accepted

Solution code:
n = int(input())
c=list(map(int, input().split()))

print(*reversed(c))

Submission status: Accepted

Solution code:
a = int(input())
b = input().split()
c  = b[::-1]

print(" ".join(c))

Submission status: Accepted

Solution code:
a = int(input())
b = list(map(int, input().split()))
b.reverse()
print(" ".join(map(str, b)))

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
for i in range(n-1):
    print(a[-i-1], end=" ")
print(a[0])

Submission status: Accepted

Solution code:
count = int(input())
list = list(map(int,input().split()))
reverse_list = []
num = -1
while -num <= len(list):
    reverse_list.append(list[num])
    num -= 1
for i in range(len(reverse_list)-1):
    print(str(reverse_list[i])+" ",end="")
print(reverse_list[-1])

Submission status: Accepted

Solution code:
def main():
  n = int(input())
  a = input().split(' ')
  
  print(*a[::-1])
  
if __name__ == "__main__":
  main()

Submission status: Accepted

Solution code:
n = int(input())
x = [int(a) for a in reversed(input().split())]
m = 0
while m < n-1 :
    print(x[m],end = ' ')
    m += 1
print(x[n-1])

Submission status: Accepted

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

a = reversed(a)

print(' '.join(map(str,a)))

Submission status: Accepted

Solution code:
n = input()
lst_all = input().split()
lst_all.reverse()
    
print(' '.join(lst_all))

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
for i in range(n - 1):
    print(a[n - i - 1], end = ' ')
print(a[0])

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

n = int(input())
A = list(map(int, input().split()))
for i in range(n - 1, -1, -1):
    print(A[i], end="")
    if i > 0:
        print(" ", end="")
print()

Submission status: Accepted

Solution code:
n = int(input())
a = list(input().split())
for i in range(n):
  if i == n-1:
    print(a[n-1-i])
  else:
    print(a[n-1-i], end=" ")

Submission status: Accepted

Solution code:
input()
arr = list(map(int, input().split()))
arr.reverse()
print(' '.join(map(str, arr)))

Submission status: Accepted

Solution code:
n = input()
values = input().split(" ")
values.reverse()
print(" ".join(values))

Submission status: Accepted

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

for i in range(0,n-1):
    print(a[::-1][i] ,end=" ")
print(a[0])

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys

n= int(input())
#tmp= float(input())
tmp = input().split()
hoge = list(map(lambda a: int(a), tmp))

ou=""
for i in range(n):
    ou+=str(hoge[n-1-i])
    if(i!=n-1):
        ou+=" "

print(ou)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
a.reverse()
for i in range(n):
    if i >= 1:
        print(" ",end='')
    print(a[i],end='')
print()

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
for i in reversed(range(0, n)):
    print(a[i], end="")
    if i != 0: print(" ", end="")
print()

Submission status: Accepted

Solution code:
n = int(input())
seq = list(map(int, input().split()))
for i in range(1, n+1):
    if i == 1:
        print("%d" %seq[-i], end = "")
    if i >= 2:
        print(" %d" %seq[-i], end = "")
print()

Submission status: Accepted

Solution code:
n = int(input())
a = list(input().split())

ans = " ".join(reversed(a))
print(ans)

Submission status: Accepted

Solution code:
input()
lst = input().split()
lst = [int(n) for n in lst]
lst = reversed(lst)
print(*lst, sep=' ')

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
a=a[::-1]
print(*a)

Submission status: Accepted

Solution code:
n = int(input())
an = list(map(int,input().split()[:n]))
print(*an[::-1])

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
for i in range(n):
         if i == n - 1:
                  print(a[0])
         else:
                  print(a[n-i-1],end= " ")

Submission status: Accepted

Solution code:
n = input()
n = int(n)
an = input()
an = an.split()
out_c1 = ''
for a in reversed(an):
    out_c1 = '{} {}'.format(out_c1,a)
else:
    out_c1 = out_c1[1:]
    print(out_c1)

Submission status: Accepted

Solution code:
n = int(input())
data = list(map(int, input().split()))
data.reverse()

for i in range(n):
    print(data[i], end="")
    if i < n-1:
        print(" ", end="")
print()

Submission status: Accepted

Solution code:
n = int(input())
list = [int(x) for x in input().split()]

list = list[::-1]
list = [str(x) for x in list]
print(' '.join(list))

Submission status: Accepted

Solution code:
n = int(input())
lst = list(map(int,input().split()))

lst.reverse()
for i in range(len(lst)):
    if i != len(lst)-1:
        print("{0} ".format(lst[i]), end="")
    else:
        print("{0}".format(lst[i]), end="")
print()

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int, input().split()))
A.reverse()
print(" ".join([str(i) for i in A]))

Submission status: Accepted

Solution code:
n = int(input())
s = list(map(int,input().split()))
s.reverse()
for i in range (n):
    if i == 0:
        print(str(s[i]),end = "")
    else:
        print(" " + str(s[i]),end = "")
print()

Submission status: Accepted

Solution code:
n = int(input())
ol = list(map(int, input().split()))

print(*reversed(ol))

Submission status: Accepted

Solution code:
a = int(input())
n = [int(i) for i in input().split()]
d = sorted(list(enumerate(n)), reverse=True)
b = []
for i in d:
    b.append(i[1])

print(" ".join(map(str, b)))

Submission status: Accepted

Solution code:
n = int(input())
a = input().split()
for i in range(n - 1, 0, -1):
    print(a[i],"", end="")
print(a[0])

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
n = int(input())
a = input().split()[::-1]

print(' '.join(a))

Submission status: Accepted

Solution code:
n = int(input())
*a, = map(int, input().split())
print(*reversed(a))

Submission status: Accepted

Solution code:
n = int(input())
al = list(map(int, input().split()))

ans = []
for i in range(-1, -(n + 1), -1):
    ans.append(al[i])

print(*ans)

Submission status: Accepted

Solution code:
n = int(input())
an = input().split()

an_rev = reversed(an)

ans = " ".join(an_rev)
print(ans)

Submission status: Accepted

Solution code:
input()
*x, = map(int,input().split())
x.reverse()
print(" ".join(map(str,x)))

Submission status: Accepted

Solution code:
a=int(input())
l=list(map(int,input().split()))
l.reverse()
print(*l)

Submission status: Accepted

Solution code:
_ = input()
a = list(input().split())
a = a[::-1]

print(*a)

Submission status: Accepted

Solution code:
input()
A=list(map(int,input().split()))
A.reverse()
print(" ".join(map(str, A)))

Submission status: Accepted

Solution code:
n=int(input())
lis=list(map(int,input().split()))
print(lis[n-1],end='')
for i in range(n-2,-1,-1):
    print(" "+str(lis[i]),end="")
print()

Submission status: Accepted

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

for i in range(n, 0, -1):
    if (i != n):
        print(end=" ")
    print(a[i - 1], end="")
    
print()

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
print(' '.join(map(str,A[::-1])))

Submission status: Accepted

Solution code:
input()
lst = list(map(int, input().split()))
print(*reversed(lst))

Submission status: Accepted

Solution code:
num = int(input())
inp = list(map(int, input().split()))
inp.reverse()

print(*inp)

Submission status: Accepted

Solution code:
N = int(input())
alist = list(map(int, input().split()))
print(*alist[::-1])

Submission status: Accepted

Solution code:
n=int(input())
x=list(map(int,input().split()))
for i in range(n-1,-1,-1):
    if i==0:
        print("%d"%x[i])
    else:
        print("%d"%x[i],end=" ")

Submission status: Accepted

Solution code:
n = int(input())
l = input().split()
l.reverse()
l2 = " ".join(l)
print(l2)

Submission status: Accepted

Solution code:
input()
nums = list(map(int,input().split(' ')))
print(*nums[::-1])

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(str,input().split()))
a.reverse()
print(" ".join(a))

Submission status: Accepted

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

op = ""

for i in (reversed(a)):
	op += str(i) + " "

print(op.rstrip(" "))

Submission status: Accepted

Solution code:
count = int(input())
data_list = list(map(int, input().split()))

for i in range(count-1, -1, -1):
    if i == 0:
        print(f"{data_list[i]}")
    else:
        print(f"{data_list[i]} ", end="")

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

def main():
    n = int(input())
    a = input().split()[::-1]
    print(" ".join(a))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())
a = input().split()
b = a[::-1]
print(" ".join(b))

Submission status: Accepted

Solution code:
n=int(input())
*a,=map(int,input().split())
print(*reversed(a))

Submission status: Accepted

Solution code:
import sys
import itertools
import math

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n, *a = map(int, read().split())
print(*a[::-1])

Submission status: Accepted

Solution code:
i=int(input())
num=list(map(int,input().split()))
while(i<len(num)):
	num.pop()
num.reverse()
str=""
for i in num:
    str+="%d "%(i)
print(str[:-1])

Submission status: Accepted

Solution code:
gbg = input()
lst = input().split()

lst = list(map(int,lst))
lst.reverse()

for i,val in enumerate(lst):
    if(i < len(lst) - 1):
        print(val,end=' ')
    else:
        print(val)

Submission status: Accepted

Solution code:
num = int(input())
a = input().split()
b=a[::-1]
for i in range(num):
    if i==0:
        print(b[i],end='')
    else:
        print(" {}".format(b[i]),end = '')
print()

Submission status: Accepted

Solution code:
n = int(input())
lst = list(map(int, input().split() ))
lst.reverse()
print(" ".join(map(str, lst )))

Submission status: Accepted

Solution code:
_ = input()
a = [int(i) for i in input().split()]
print(*a[::-1])

Submission status: Accepted

Solution code:
input()
a = list(map(int, input().split()))
a.reverse()
print(' '.join(map(str, a)))

Submission status: Accepted

Solution code:
n = int(input())
nums = list(map(str, input().split()))
nums.reverse()

result = " ".join(nums)

print(result)

Submission status: Accepted

Solution code:
input()
print(" ".join(map(str,reversed(input().split()))))

Submission status: Accepted

Solution code:
count = int(0)
x = input().split()
count2 = int(x[0])
y = list(map(int, input().split()))
y.reverse()
print(y[count],end='')
count += 1
for j in range(count2 - 1):
    print(' ',end='')
    print(y[count],end='')
    count += 1
print('')

Submission status: Accepted

Solution code:
x = int(input())
num_list = list(map(int,input().split()))

num_list.reverse()

for i in range(x) :
    if i == x-1 :
        print(num_list[i] ,end="")
        break
    else :
        print("{} ".format(num_list[i]) , end="")

print()

Submission status: Accepted

Solution code:
a = input()
lis = list(map(int, input().split()))
lis2 = lis[::-1]
for i in range(len(lis2)):
    if i != len(lis2) - 1:
        print(lis2[i], end = " ")
    else:
        print(lis2[i])

Submission status: Accepted

Solution code:
n = int(input())
a = list( map(int, input().split()) )
b = ""
for i in range(n):
    b += str(a[n-i-1])
    if i==n-1:
        break
    b += " "
print(b)

Submission status: Accepted

Solution code:
n=int(input())
a=[int(x) for x in input().split()]
b=[]
i=n-1
while(i>=0):
    b.append(str(a[i]))
    if i>0:
        b.append(" ")
    i-=1
bo="".join(b)
print(bo)

Submission status: Accepted

Solution code:
n=int(input())
lis=list(map(int,input().split()))
lis.reverse()
print(' '.join(map(str,lis)))

Submission status: Accepted

Solution code:
inp1 = int(input())
inp2 = list(map(int, input().split()))

inp2.reverse()
print(' '.join(map(str, inp2)))

Submission status: Accepted

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

a.reverse()
print(*a)

Submission status: Accepted

Solution code:
a=int(input())
n=input()
n=n.split(" ")
f=n[a-1]
for i in range(a-1):
    f=f+" "+n[a-2-i]
    
print(f)

Submission status: Accepted

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

a.reverse()
for i in range(n):
	if i >= 1:
		print(" ", end = '')
	print(a[i], end = '')
print()

Submission status: Accepted

Solution code:
input()
a = list(reversed(input().split()))
print(*a)

Submission status: Accepted

Solution code:
n = int(input())
a_list = list(map(int, input().split()))[::-1]
for i in range(n-1):
    print(a_list[i], end=" ")
print(a_list[n-1])

Submission status: Accepted

Solution code:
n = int(input())
A = [int(a) for a in input().split()]

A.reverse()
print(*A)

Submission status: Accepted

Solution code:
_ = input()

lst = input().split()

for i in range(len(lst) - 1, -1, -1):
    print(lst[i], end="")
    
    if i != 0:
        print(" ", end="")
print()

Submission status: Accepted

Solution code:

length = int(input())
list_input = list(map(int, input().split()))

list_invert_str = ''
for i in range(length-1, -1, -1):
    item = list_input[i]
    list_invert_str += str(item)
    if i > 0:
        list_invert_str += ' '
        
print(list_invert_str)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
b = []

for j in range(0, len(a)):
    b.append(a[n-j-1])

print(*b)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
ans = []
for i in range(N):
    ans.append(A[N-1-i])
print(" ".join(map(str, ans)))

Submission status: Accepted

Solution code:
n=input()
a=map(int,raw_input().split())
a.reverse()
for s in a:
    print(s),

Submission status: Accepted

Solution code:
n = int(input())
a_str = input().split(" ")
if n != len(a_str):
    quit()
a_str.reverse()
for i in range(len(a_str)):
    print(a_str[i], end="")
    if i != len(a_str)-1:
        print(" ", end="")
print()

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int,input().split()))
ans = ""
for i in range(n-1):
    ans += str(l[-(i+1)]) + " "
ans += str(l[0])
print(ans)