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 = input().split()
x = reversed(a)
print(' '.join(x))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in box:
    if i == box[-1]:
        print(i)
    else:
        print(i, end =' ')

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

Submission status: Accepted

Solution code:
def Z(): return int(input())
def ZZ(): return [int(_) for _ in input().split()]

def main():
    n = Z()
    A = ZZ()
    print(*A[::-1])

    return

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
l = [int(x) for x in input().split()]
l.reverse()
# print(l)
j = 0

for i in l:
    if j != n-1:
        print(f"{i} ", end="")
    else:
        print(f"{i}", end="")
    j += 1
print()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

i=0
b=[]
for i in range(n):
    b.append(a.pop())
print(*b)

Submission status: Accepted

Solution code:
n=int(input())
s=0
t=list(map(int,input().split()))
t.reverse()
for i in t:
    if s!=n-1:
    
        print(i,'',end="")
        s=s+1
    else:
        print(i)

Submission status: Accepted

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

Submission status: Accepted

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

n_list.reverse()

print(* n_list)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
#a.sort(reverse=True)

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

Submission status: Accepted

Solution code:
_ = input()
l = list(input().split())
l.reverse()

print(' '.join(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:
n=int(input())
a=list(map(int,input().split()))
a.reverse()
x=''
for i in a:
    x+=str(i)
    x+=' '
x=x[:-1]
print(x)

Submission status: Accepted

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

print(*a[::-1])

Submission status: Accepted

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

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 and i < n:
        print(" ", end = "") 
    print(elem, end = "")
print()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
list_num = [int(_) for _ in input().split(" ")]
list_num.reverse
for i in range(N, 0, -1):
    if i == 1:
        print(list_num[i - 1], end="")
    else:
        print(list_num[i - 1], 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())

sequence = input().split()
sequence = sequence[::-1]
for i in range(len(sequence)):
    if i == len(sequence) - 1:
        print(sequence[i])
    else:
        print(sequence[i], end=' ')

Submission status: Accepted

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

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

Submission status: Accepted

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

lis = list()
for i in range(1,N+1):
    lis.append(a[-i])

print(" ".join(lis))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
n-=1
b=[]
while n>=0:
    b.append(a[n])
    n-=1
print(' '.join(map(str, b)))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
l = input().split()[:n]

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

Submission status: Accepted

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

for i in reversed(a):
    o = o + i + " "

print(o.strip(" "))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
line = [int(x) for x in input().split()]
nums = ""
for x in reversed(line):
    nums += str(x) + " "
print(nums.strip())

Submission status: Accepted

Solution code:
#42 数列の反転

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())
#for i in range(n):
a=list(map(int,input().split()))

a.reverse()

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

Submission status: Accepted

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

print()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

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

Submission status: Accepted

Solution code:
n = int(input())

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

r.reverse()

[print(x,end=" ") if x != r[n-1] else print(x) for x in r ]

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
S = []
[S.append(s) for s in input().split()]

S = S[::-1]

print(" ".join(S))

Submission status: Accepted

Solution code:




n=input()


ls=list(input().split())


result=list(reversed(ls))

for i,x in enumerate(result):
    if i==0:
        print(f"{x}",end="")
    else:
        print(f" {x}",end="")

print("")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = A[::-1]

print(*ans)

Submission status: Accepted

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

Submission status: Accepted

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

a = a[::-1]

print(*a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

a=list(map(int,input().split()))
a.reverse()
print(*a,sep=' ')

Submission status: Accepted

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

for i in range(n):
    if i >= 1:
        print(' ',end= '')
    print(data[i], end='') 
print()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
s = ""
for i in range(n - 1, -1, -1):
    s += f"{a[i]} "
s = s.rstrip()
print(s)

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:
n = int(input())
N = list(map(int,input().split()))[::-1]
print(*N)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
input_list = input().split(' ')

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

print(input_list[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
#42

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

#print(A)
A.reverse()
for i in range(n-1):
    print(A[i],end=' ')
print(A[n-1])

Submission status: Accepted

Solution code:
n=int(input())

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

lst.reverse()

print(*lst,sep=" ")

Submission status: Accepted

Solution code:
n = int(input())
line=input()
s=[]
t = line.split(" ")
for i in range(0,n):
    s.append(int(t[i]))
s.reverse()
s = [str(j) for j in s]
m=' '.join(s)
print(m)

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:
num = int(input())

x = map(int, input().split())

list_x = list(x)

new_x = reversed(list_x)

print(*new_x)

Submission status: Accepted

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


for i in range (num-1,-1,-1):
    if i == 0:
        print('%d'%table[i])

    else:
        print('%d '%table[i],end="")

Submission status: Accepted

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

line.reverse()

print(*line)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

n = int(input())
lst = list(map(int,input().split()))
tmp = []

for i in range(n//2):
   tmp = lst[i]
   lst[i] = lst[n-1-i]
   lst[n-1-i] = tmp
   
print(" ".join(map(str,lst)))

Submission status: Accepted

Solution code:
N = int(input())
lst = [int(i) for i in input().split()]#lst = list(map(int, input().split()))
lst.reverse()

print(" ".join(map(str,lst)))   # 10 20 30 40 50

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(*a)

Submission status: Accepted

Solution code:
x=int(input())
lst=input().split()
i=0
k=0
while i<(x/2) :
    w=int(lst[i])
    lst[i]=int(lst[(x-1)-i])
    lst[(x-1)-i]=w
    i=i+1
while k<x :
    if k<(x-1) : print(lst[k],end=" ")
    else : print(lst[k])
    k=k+1

Submission status: Accepted

Solution code:
a = int(input())
data = list(input().split())
count = 0
for i in data[::-1]:
    count += 1
    if count == len(data):
        print(i)
    else:
        print(i + ' ' ,end ="")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
num_list = list(map(int, input().split()))
num_list.reverse()
for d, i in enumerate(num_list):
    if d == len(num_list) - 1:
        print (i)
    else:
        print (i, end=' ')

Submission status: Accepted

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

outlist = []
for i in range(n-1,-1,-1):
    outlist.append(inlist[i])

for j in range(n):
    if j<n-1:
        print(outlist[j],end=' ')
    if j==(n-1):
        print(outlist[j])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a = list(reversed(a))
print(*a)

Submission status: Accepted

Solution code:
n = int(input())

a=list(map(str,input().split()))

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

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())
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()))
lis.reverse()

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

except EOFError:
   pass

Submission status: Accepted

Solution code:
n=int(input())

a=input().split()

i=0
while i<=(n-1)/2:
    a[i], a[n-i-1]=a[n-1-i], a[i]
    i+=1

i=0
while i<=n-1:
    print(a[i], end="")
    if i<n-1:
        print(" ", end="")
    i+=1 
print()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
_ = input()

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

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())
s=list(map(int,input().split()))
s.reverse()
for i in range(n):
	if i>=1:
		print(" ", end = '')
	print(s[i], end = '')
print()

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

Submission status: Accepted

Solution code:
N = int(input())

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

for i in range(N-1):
    print(str(list[N-1-i]) + ' ',end='')

print(str(list[0]))

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 = input().split()
a.reverse()
print(' '.join(a))

Submission status: Accepted

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

Submission status: Accepted

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

revli = li.reverse()
print(' '.join(map(str,li)))

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:
N=int(input())
s=list(map(int,input().split()))
s.reverse()
print(*s)

Submission status: Accepted

Solution code:
input_num = int(input())
input_list = list(map(int, input().split()))[::-1]
for i in input_list[:-1]:
    print(i, end=' ')
print(input_list[-1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
b = input().split()

for a in b[::-1]:
    print(a,end='')
    if a != b[::-1][-1]:
        print(' ', end='')
print('')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(" ".join(map(str,lst[-1:-(len(lst)+1):-1])))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin

n = int(stdin.readline())
lis = list(map(int, stdin.readline().split()))

lis.reverse()

print(*lis)

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    nums = list(map(int, input().split()))
    for i in range(n-1, -1, -1):
        if i == 0:
            print(nums[i])
        else:
            print(f"{nums[i]} ", end="")
    return 0


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a.reverse()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
N=int(input())

a=input().split()


a=a[::-1]
a=" ".join(a)
print(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:
input()
a=list(input().split())
print(*a[::-1])

Submission status: Accepted

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

alist.reverse()

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

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

b=list()

for i in range(n):
  b.append(a[n-1-i])

b = map(str, b)
result = ' '.join(b)
print(result)

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=list(map(int,input().split()))
a=a[::-1]
#print(a)
for i in range(n):
    if i!=n-1:
        print(str(a[i])+" ",end="")
    else:
        print(a[i])

Submission status: Accepted

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

for i in range(len(a)):
  b.append(str(a[len(a) - i - 1]))
 
print(" ".join(b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
total = int(input())
array = list(map(int, input().split()))

for i in reversed(range(0, total, 1)):
    if i == 0:
        print(f"{array[i]}")
    else:
        print(f"{array[i]} ", end="")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
count=input()
numbers=list(map(int,input().split()))
# リストを逆順に並び替え、新しいリストに入れる
re_numbers=list(reversed(numbers))
print(*re_numbers)

Submission status: Accepted

Solution code:
n = int(input())
a = input()
z = [x for x in map(int, a.split())]

z.reverse()

print(*z)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

for i in range(len(a)-1,-1,-1):
	if i!=0:
		print(a[i], end=' ')
	else:
		print(a[i])

Submission status: Accepted

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

t = list(reversed(s))
str = ' '.join(t)
print(str)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print(*a[::-1])

Submission status: Accepted

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

for i in range(n):
    ans = ans + " " + str(lst.pop(len(lst)-1))
print(ans.strip())

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

Submission status: Accepted

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

nl.reverse()

for i, elem in enumerate(nl):
    if i > 0:
        print(' ', end='')
    print(elem, end='')
print()

Submission status: Accepted

Solution code:
n = int(input())
a = [int(x) for x in input().split()]
# a.sort()
a.reverse()
for i,elem in enumerate(a):
    if i>0:
        print(' ',end='')
    print(a[i],end='')
print()

Submission status: Accepted

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

for i,x in enumerate(reversed(a)):
    if(i):
        print(" ",end="")
    print(x,end="")
print()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(" ".join([str(y) for y in li]))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(sequense[-length])

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(n-1):
    print(a[n-i-1], end ="")
    print(" " , end="")
#         print(i , end="")
#
#     elif '3' in str(i):
#         print(" " , end="")
#         print(i , end="")
#
# print()
print(a[0])

Submission status: Accepted

Solution code:
N = int(input())
A = [int(a) for a in input().split()]
print(*reversed(A))

Submission status: Accepted

Solution code:
n,*N = map(int,open(0).read().split())

N = N[::-1]

answer = " ".join(str(i) for i in N )
print(answer)

Submission status: Accepted

Solution code:
base_num = input("")
base_line = input("")
term = base_line.split(' ')

last_num = int(base_num)-1
list_num = list()
for n in term:
    list_num.append(int(n))

list_num.reverse()

for i,r in enumerate(list_num):
    print('{}'.format(r),end='')
    if i != last_num:
        print(' ',end='')

print()

Submission status: Accepted

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

l.reverse()
print(*l)