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()))
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())
print(*input().split()[-1::-1])

Submission status: Accepted

Solution code:
def reverse_array(array):
    array = array[::-1]
    
    for i in range(len(array)):
        if i == len(array) - 1:
            print(str(array[i]), end = "")  
        else:
            print(str(array[i]) + " ", end = "") 

    print("\n", end="")       

if __name__ == "__main__":

    number = int(input())
    seq = input().split(" ")
    array = [int(a) for a in seq ]
    reverse_array(array)

Submission status: Accepted

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

Submission status: Accepted

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

print(*reversed(a))

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()))
a.reverse()
for i in range(n):
    print(a[i],end="")
    if(i!=n-1):
        print(" ",end="")
print()

Submission status: Accepted

Solution code:
_ = input()
l = list(map(int, input().split()))
l = l[::-1]
print(' '.join(str(i) for i in l))

Submission status: Accepted

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

Submission status: Accepted

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

print(" ".join(_nums[::-1]))

Submission status: Accepted

Solution code:
n = int(input())
a = input()
lst = a.split()
lst_n = [int(i) for i in lst]
lst_n.reverse()
print(*lst_n)

Submission status: Accepted

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

T.reverse()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
sample_number = int(input())
numbers_list = list(map(int, input().split(" ")))

for i in reversed(numbers_list):
    if numbers_list.index(i) != 0:
        print(i,end=" ")
    else:
        print(i)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = input()
data = input().split()
data.reverse()
print(' '.join(data))

Submission status: Accepted

Solution code:
n, *a = open(0).read().split()
print(' '.join(reversed(a)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
idx = input()
nums = [int(e) for e in input().split()]
nums.reverse()
print(*nums,sep=" ")

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")

def main():
    n=int(input())
    aa=list(map(int,input().split()))
    aa.reverse()
    print(*aa)
main()

Submission status: Accepted

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

print(' '.join(arr))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

A.reverse()
print(*A)

Submission status: Accepted

Solution code:
_ = input()
a = input().split()

print(" ".join(a[::-1]))

Submission status: Accepted

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

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:
_ = input()
a = list(map(int, input().split()))
print(" ".join(map(str, reversed(a))))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input()
arr=input().split()
ans=''
for v in reversed(arr):
    ans+=v+' '
print(ans[:len(ans)-1])

Submission status: Accepted

Solution code:
n=map(int, input().split())
li = list(map(int, input().split()))
n_li= list(reversed(li))
n_li=" ".join(str(x) for x in n_li)
print(n_li)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
dev = input()
l = input().split()

l.reverse()
print(' '.join(l))

Submission status: Accepted

Solution code:
num = int(input())
A = [int(x) for x in input().split(' ')]
inverse_A = A[::-1]
output = ''
for i in range(num):
    output += str(inverse_A[i])
    if i != num - 1:
        output += ' '
print(output)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
a = [int(i) for i in input().split()]

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
l = list(input().split())
l.reverse()
print(*l)

Submission status: Accepted

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

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

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

if __name__ == "__main__":
    main()

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:
import sys
i=int(input())
n=list(map(int,input().split()))
#n=sorted(n)
n.reverse()
print(' '.join(map(str,n)))

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()))

a.reverse()
c = ' '.join([str(b) for b in a])
print(c)

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())
l=input().split()

for i in range(n//2):
    a=l[i]
    l[i]=l[(n-1)-i]
    l[(n-1)-i]=a

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

nstr = str()
for s in nlst:
    nstr += str(s) + " "
print(nstr[:-1])

Submission status: Accepted

Solution code:
n = int(input())
A = [int(x) for x in 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()))

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

print(a[0])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for x in lst[:0:-1]:
    print(x,end=" ")
print(lst[0])

Submission status: Accepted

Solution code:
length = int(input())
nums = list(map(int, input().split()))


for i, num in enumerate(nums[::-1]):
    print(num, end='')
    if not i == length-1:
        print(end=' ')
print()

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split(" ")))
a.reverse()
for i,elem in enumerate(a):
    if i>0:
        print(" ",end="")
    print(elem,end="")
print()

Submission status: Accepted

Solution code:
N = input()
lst = input().split()
lst.reverse()
print(" ".join(lst))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
arr = s.split()
print(' '.join(arr[::-1]))

Submission status: Accepted

Solution code:
n = int (input())
s = input()
arr = s.split()
print(' '.join(arr[::-1]))

Submission status: Accepted

Solution code:

n = int(input())
s = input()
arr = s.split()
print(' '.join(arr[::-1]))

Submission status: Accepted

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

print(' '.join(map(str, numbers[::-1])))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input()
l = list(map(int,input().split()))
l.reverse()
for i, elem in enumerate(l):
    if i > 0:
        print(' ',end='')
    print(elem,end='')
print()

Submission status: Accepted

Solution code:
input()
li = list(input().split(' '))
li.reverse()
print(' '.join(li))

Submission status: Accepted

Solution code:
input()
A = list(map(int, input().split()))
n = len(A)
for i in reversed(A):
    if n != 1:
        print(i,end=" ")
        n -= 1
    else:
        print(i)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

lst.reverse()

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

Submission status: Accepted

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

print(' '.join(map(str, reversed(input_list))))

Submission status: Accepted

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

for i in range(n-1, -1, -1):
    if i != 0:
        print('{} '.format(a[i]), end='')
    else:
        print(a[i], end='')
print()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = int(input())

a = [ int(x) for x in input().split()]

a.reverse()

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

print()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n = input()
    a = input().split()
    print(' '.join(reversed(a)))
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#coding: utf-8

n = int(input())
a = list(map(str, input().split()))
b = a[-1::-1]
print(' '.join(b))

Submission status: Accepted

Solution code:
num = input()
num = int(num)

s = input().split()

list = []
for i in range(num):
    x = int(s[i])
    list.append(x)

for i in range(num-1,-1,-1):
    print(list[i],sep="",end="")
    if i!=0:
        print(" ",sep="",end="")

print()

Submission status: Accepted

Solution code:
# -*- coding:utf-8
n = int(input())
A = list(map(int,input().split()))

A.reverse()

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

Submission status: Accepted

Solution code:
def test():

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

	for i in range(n-1):
		print(f"{seq[n-i-1]} ",end='')
	print(f"{seq[0]}")

if __name__ == "__main__":
	test()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(' '.join([str(i) for i in reversed(A)]))

Submission status: Accepted

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

print(" ".join(A[::-1]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans_str = ""
for i in s[::-1]:
    ans_str += str(i) + " "
print(ans_str.strip())

Submission status: Accepted

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

a.reverse()
print(' '.join(a))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
a = input()
nums = list(map(int, input().split()))
nums.reverse()
print(" ".join(map(str, nums)))

Submission status: Accepted

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

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[n-i],end="")
print()

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[n-i],end="")
print()

Submission status: Accepted

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

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()))
for x in range(1,n+1):
    if x != 1: print(" ",end="")
    print(a[n-x],end="")
print()

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()))
for i in range(n // 2):
    a[i], a[-(i + 1)] = a[-(i + 1)], a[i]
print(" ".join(str(n) for n in a))

Submission status: Accepted

Solution code:
n,l = int(input()),list(map(int,input().split()))
def fun(x):
    if(x==0):
        print(l[x])
        return
    print("%d "%l[x],end = '')
    fun(x-1)
fun(len(l)-1)

Submission status: Accepted

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

table.reverse()

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

Submission status: Accepted

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

a.reverse()
print(a[0],end="")
for x in a[1:]:
  print(" {}".format(x),end="")
print()

Submission status: Accepted

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

x = []

for i in range(n):
    x.append(a.pop())

print(" ".join(x))

Submission status: Accepted

Solution code:
z=int(input())
lst=[]
lst=list(map(int,input().split()))
for x in range(z):
    if x==z-1:
        print(str(lst[-(x+1)]))
    else:
        print(str(lst[-(x+1)])+' ',end='')

Submission status: Accepted

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

while (i >= 0):
    result.append(a[i])
    i -= 1

x = " ".join(map(str,result))
print(x)

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(n):

    if i==n-1:
        print(a_list[n-1-i])
    else:
        print(a_list[n-1-i],end=" ")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N =int(input())
vals = input().split()
print(" ".join(reversed(vals)))

Submission status: Accepted

Solution code:
input()

nums = []

for n in input().split():
    nums.insert(0, n)

print(" ".join(nums))

Submission status: Accepted

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

ns = ns[::-1]
print(*ns)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    elem_num = int(input())
    int_list = list(map(lambda x: int(x), input().split(" ")))
    print(" ".join([str(elem) for elem in int_list[-1::-1]]))

Submission status: Accepted

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

Submission status: Accepted

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

ARRAY.reverse()
ARRAY = [str(i) for i in ARRAY]
print(' '.join(ARRAY))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
x = int(input())

input = list(map(int, input().split()))
n = -1
while n > x *(-1):
    print(str(input[n])+ ' ', end = '')
    n -= 1
print(input[0])

Submission status: Accepted

Solution code:
input()
li = input().split()

for s in reversed(range(len(li))):
    print(li[s], end='')
    if s != 0:
        print(' ', end='')
print('')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(n // 2):
    list[i], list[n - 1 - i] = list[n - 1 - i], list[i]
    
for i in range(n):
    if i != n - 1:
        print("%s " % list[i], end="")
    else:
        print("%s" % list[i])

Submission status: Accepted

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

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(str(l[i]))
    else:
        print(str(l[i]) + " ", end="")

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int,input().split()))
m = []
for i in range(n) :
  m.append(l[(-1)*(i+1)])
n = list(map(str, m))
print(' '.join(n))

Submission status: Accepted

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

Submission status: Accepted

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

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

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())

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

table.reverse()

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

Submission status: Accepted

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

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

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 = 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 = list(map(int, input().split()))

a_list.reverse()

for i, a in enumerate(a_list):
    if i == n - 1:
        print(a)
    else:
        print(a, end=" ")

Submission status: Accepted

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

R=[]
i=n-1
while 0<=i:
    r=L.pop(i)
    R.append(r)
    i-=1
for i in range(n):
    if i!=n-1:
        print(R[i],end=' ')
    else:
        print(R[i])

Submission status: Accepted

Solution code:
#from numpy import*
#from scipy import*
from collections import* #defaultdict Counter deque appendleft
from fractions import gcd
from functools import* #reduce
from itertools import* #permutations("AB",repeat=2) combinations("AB",2) product("AB",2) groupby
from operator import mul
from bisect import* #bisect_left bisect_right
from heapq import* #heapify heappop heappushpop
from math import factorial,pi
from copy import deepcopy
import sys
#input=sys.stdin.readline  #危険！基本オフにしろ！
sys.setrecursionlimit(10**6)


def main():
    n,*a=map(int,open(0).read().split())
    print(*reversed(a))
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())

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

list_num.reverse()

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(input().split())
a.reverse()
x = ''
for i in range(n-1):
    x = x + str(a[i]) + ' '
x = x + a[n-1]
print(x)

Submission status: Accepted

Solution code:
array_len = input()
array_num = list(map(int, input().split()))
print(" ".join(map(str, reversed(array_num))))

Submission status: Accepted

Solution code:
n = int(input())

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

for i in data[::-1]:
  if i == data[0]:
    print(i)
  else:
    print(i,"",end="")

Submission status: Accepted

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

a = [int(x) for x in reversed(lst)]

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

Submission status: Accepted

Solution code:
n = int(input())
a = input().split()
print(" ".join(reversed(a)))

Submission status: Accepted

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

Submission status: Accepted

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

table.reverse()

for i in range(n):
    if i > 0:
        print(" ", end="")
    print(table[i], end="")
print()

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:
n = int(input())
ns = list(map(int, input().split()))
ns.reverse()
for i, elem in enumerate(ns):
    if i > 0:
        print(" ", end = "") 
    print(elem, end = "")
print()

Submission status: Accepted

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

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:
n = int(input())
a = [int(b) for b in input().split()]
a_rev = [a[len(a) - i - 1] for i in range(n)]
print(a_rev[0], end='')
for b in a_rev[1:]:
    print(' {}'.format(b), end='')
print()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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 = int(input())
a = list(map(int,input().split()))
a.reverse()
for i,elem in enumerate(a):
  if i>0:
    print(" ",end="")
  print(elem, end="")
print()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
a=input().split()
print(" ".join(reversed(a)))

Submission status: Accepted

Solution code:
n = int(input())

lst = input().split()

print(' '.join(lst[::-1]))

Submission status: Accepted

Solution code:
n = int(input())
a = input().split()
b = reversed(a)
print(' '.join(b))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
outLength = int(input())
outArray = [] 
numberArray = str(input()).split(" ")
for i in range(1, outLength + 1):
    outArray.append(str(numberArray[i * -1]))
print(" ".join(outArray))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
	n = int(input())
	d = input().split()
	d.reverse()
	for i in range(len(d)):
		if i == len(d)-1:
			print("%s" % d[i])
		else:
			print("%s" % d[i], end=" ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
table = [int(e) for e in input().split()]
table.reverse()
print(" ".join(map(str, table)))

Submission status: Accepted

Solution code:
###
### atcorder test program
###

### math class
class math:
    ### pi
    pi = 3.14159265358979323846264338

    ### GCD
    def gcd(self, a, b):
        if b == 0:
            return a
        return self.gcd(b, a%b)

math = math()

### output class
class output:
    ### list
    def list(self, l):
        l = list(l)
        for i, num in enumerate(l):
            print(num, end="")
            if i != len(l)-1:
                print(" ", end="")
        print()

output = output()

### input sample
#i = input()
#A, B, C = [x for x in input().split()]
#templist = [int(w) for w in input().split()]
#R = float(input())
#A = [int(x) for x in input().split()]

### output sample
#print("{0} {1} {2:.5f}".format(A//B, A%B, A/B))
#print("{0:.6f} {1:.6f}".format(R*R*math.pi,R*2*math.pi))
#print(" {}".format(i), end="")

N = input()
L = [x for x in input().split()]

output.list(reversed(L))

Submission status: Accepted

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