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:
num=int(input())
input_data = [int(i) for i in input().split()]
input_data.reverse()
print(" ".join(str(b) for b in input_data))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
arr = input().split(" ")
arr.reverse()
s = " ".join(arr)
print(s)

Submission status: Accepted

Solution code:
a=[]
n = int(input())

s = input().rstrip().split(" ")

for i in range(n):
    a.append(int(s[i]))
a=a[::-1]
for i in range(n-1):
    print(a[i],end=' ' )
print(a[n-1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i=0
j = int(input())
numlist = list(int(i) for i in input().split())

while i < j-1:
  print(numlist[j-i-1],end='')
  print(' ',end='')
  i += 1
print(numlist[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split(" ")))
for lil_a in a[-1:0:-1]:
    print("%d "%lil_a, end="")
print("%d"%a[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())
x=[int(i) for i in input().split()]
for i in reversed(range(n)):
    if 0==i:
        print(x[i])
    else:
        print(x[i],"",end="")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
nums=""
count=1
a = input()
W = [int(x) for x in input().split()]
W.reverse()
for i in W:
    if count == int(a):
        nums+=str(i)
    else:
        nums +=str(i)+" " 
    count+=1                                                 
print(nums)

Submission status: Accepted

Solution code:
n=int(input())
m=list(map(str,input().split(" ")))                                         
M=list(reversed(m))
result=''
for i in range(n):
    if n == i + 1:
        result += (M[i])
    else:
        result += (M[i]) + " "
print(result)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
input()
a = [eval(x) for x in input().split()]
for i in range(-1,-len(a)-1,-1):
	print(a[i],end = '\n' if i == -len(a) else ' ')

Submission status: Accepted

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

for i in a:
    b.insert(0,i)
print(' '.join(map(str, b)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#??°???????????¢

n = input()
n = int(n)

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

# ?????¢
l.reverse()

# ????§????????????§??????
for i in range(n-1):
    print(l[i], end=" ")
print(l[n-1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input()
list1 = list(map(int, input().split()))
list1.reverse()
result=""
for i in range(0,len(list1)):
    result += str(list1[i])
    if len(list1)-1 == i:
        pass
    else:
        result += " "
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
dummy = input()
int_list = [x for x in input().split()][::-1]
print(" ".join(int_list))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
for i, j in enumerate(reversed(a)):
    if i:
        print(" {}".format(j), end = "")
    else:
        print(j, end = "")
print()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Aizu Problem ITP_1_6_A: Reversing Numbers
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")

N = int(input())
A = [int(_) for _ in input().split()]
print(' '.join([str(a) for a in A[::-1]]))

Submission status: Accepted

Solution code:
def print_1(array):
    for i in range(len(array)):
        if i == len(array) - 1:
            print(array[i])
        else:
            print(array[i], end=" ")
            
n = int(input())
a = [num for num in input().split()]
a.reverse()
print_1(a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in a:
    print i,

Submission status: Accepted

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

Submission status: Accepted

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

print(nums[-1], end="")
for i in range(l-2, -1, -1):
    print(" {0}".format(nums[i]), end="")
print("")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

n = int(input().rstrip())

a = input().rstrip().split(" ")
for val in range(n):
    if val != 0:
        print(" ", end = "")
    print(a[n - val - 1], end = "")
print()

Submission status: Accepted

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

o = [int(i) for i in a]
for idx in range(0, int(n / 2)):
    w = o[idx]
    o[idx] = o[n - idx - 1]
    o[n - idx - 1] = w

for idx in range(n):
    print(o[idx], end = '')
    if idx == n - 1:
        break
    print(' ', end = '')
print()

Submission status: Accepted

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

Submission status: Accepted

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

print(*line[::-1])

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:
_ = input()
print(" ".join(reversed(input().split())))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

b.reverse()

print(" ".join(b))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
idx = int(input())
data = list(input().split())
data_int = [int(i) for i in data]
for j in range(1, idx+1):
    if j == idx:
        print(data_int[-j])
    else:
        print(data_int[-j], end=" ")

Submission status: Accepted

Solution code:
# (c) midandfeed
int(input())
q = [int(x) for x in input().split()]
for i in range(len(q)-1, -1, -1):
	print(q[i], end='')
	if (i == 0):
		print()
	else:
		print(' ', end='')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(raw_input())
array = raw_input().split()
for i in reversed(range(n)):
    print array[i],

Submission status: Accepted

Solution code:
x = input()
a = []
b = input().split()
for i in b:
    a.append(i)
a.reverse()
print(" ".join(a))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

n = int(input())
a = [int(i) for i in input().split()]
for i in range(len(a) - 1, -1, -1):
    if i > 0:
        sys.stdout.write(str(a[i]))
        sys.stdout.write(' ')
    else:
        print(a[i]);

Submission status: Accepted

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

num.reverse()
print (' '.join(num))

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys

n = int(raw_input())
data = raw_input().split()

for i in range(n-1):
	sys.stdout.write("{:} ".format(data[n-i-1]))
sys.stdout.write("{:}".format(data[0]))
print("")

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    _array = input().split()
    _array.reverse()
    print(' '.join(_array))


main()

Submission status: Accepted

Solution code:
line = input()
n = int(line)

line = input()
nums = list(map(int, line.split()))

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_6_A&lang=jp

"""
import sys
from sys import stdin
input = stdin.readline


def main(args):
    n = int(input())
    numbers = [int(x) for x in input().split()]
    numbers.reverse()
    print(*numbers)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def main():
    lines = sys.stdin.readlines()

    max_elem_num = 0
    nums = []
    for index, line in enumerate(lines):
        line = line.strip('\n')
        elems = line.split(" ")
        #print elems
        if index == 0:
            max_elem_num = int(elems[0])
            #print max_elem_num
        elif index == 1:
            for i in range(0, max_elem_num):
                print elems[max_elem_num - 1 - i],
        else:
            break

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

import fileinput
import math

def main():
    number = int(input())
    for line in fileinput.input():
        tokens = list(map(int, line.strip().split()))

        tokens.reverse()

        for i in range(number):
            if(i == number-1):
                print('%d' % (tokens[i]), end='')
            else:
                print('%d ' % (tokens[i]), end='')

        print('')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
n=int(input())
a=input().split()
b=[]
for i in range(n):
    b.append(a[i])
for i in range(n):
    sys.stdout.write("{0}".format(a[n-1-i]))
    if i==n-1:
        sys.stdout.write("\n")
    else:
        sys.stdout.write(" ")

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())

list = [int(n) for n in input().split()]
list.reverse()
print(*list)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

a = input().split()
a.reverse()
print(*a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
count = int(input())
array = list(map(int,input().split()))
array.reverse()
for i in range(count):
    print('{}'.format(array[i]),end="")
    if i != count - 1:
        print(' ',end="")
    else :
        print("")

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in 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(raw_input())
a = map(int, raw_input().split())
a.reverse()
for k in range(0, n):
    print a[k],

Submission status: Accepted

Solution code:
n = input()
nums = list(map(int,input().split()))
cnt=0
for i in reversed(nums):
    if cnt==0:
        print(i,end="")
        cnt += 1
    else:
        print(" {}".format(i),end="")
print()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
t = eval(input());
x = list(map(int,input().split(' ')));
end = '';
for i in reversed(x):
    t -= 1;
    if(t!=0): end += str(i) + ' ';
    else: end += str(i)
    
print(end);

Submission status: Accepted

Solution code:
# coding:utf-8
n = input()
array = map(int, raw_input().split())
array.reverse()
for v in array:
    print v,

Submission status: Accepted

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

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

print(b.strip())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
sp = input()

spSpl = sp.split()

spSpl.reverse()

print(*spSpl)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
cn=1
while True:
	try:
		if cn ==1:
			n = int(input())
			cn+=1
		if cn ==2:
			nums = input().split()
		
		nums = list(map(int, nums))
		nums.reverse()
		l = ''
		for x in nums:
			l+= ' {}'.format(x)
		print(l[1:])
		
	except EOFError:
		break

Submission status: Accepted

Solution code:
n = input()
list = [x for x in input().split( )]
list = list[::-1]
string = ' '.join(list)
print(string)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(*b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding: utf-8

n = int(input())
l = input().split()
l.reverse()

for i,j in enumerate(l):
    print(j, end = ' ' if i != n-1 else '\n')

Submission status: Accepted

Solution code:
n = int(input())
a = input().split()
result=""
for i in range(n):
    if i != n-1:
        result+=a[n-1-i]+" "
    else:
        result+=a[0]
print(result)

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

import sys

n = int(sys.stdin.readline())
_list = sys.stdin.readline().split()

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

Submission status: Accepted

Solution code:
n=int(input())

a=input().split()

b=[]
for i in range(n):
    out=a[(n-i-1)]
    b.append(out)
print(" ".join(map(str, b)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input()
x = [str(x) for x in input().split()]
print(' '.join(x[::-1]))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
n = int(input())
a = list(map(int, input().rstrip().split()))
for i in range(n-1, -1, -1):
    if i == 0:
        print(a[i])
    else:
        print(a[i], end=" ")

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())
a = list(map(str, input().split()))
print(' '.join(a[::-1]))

Submission status: Accepted

Solution code:
#!/usr/bin/env python

if __name__ == '__main__':
    raw_input()
    print ' '.join(raw_input().split()[::-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:
import sys

length = int(sys.stdin.readline())
num_seq = sys.stdin.readline().split()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(n // 2):
	l[i],l[-1-i] = l[-1-i],l[i]
        
for j in l:
	if j == l[0]:
		print(str(j), end="")
	else:
		print(" " + str(j), end="")
		
print("")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

if __name__ == '__main__' :
        n = int(input())
        a = input().split(" ")
        print(" ".join(a[::-1]))

Submission status: Accepted

Solution code:
n = input()
a = map(int,raw_input().split())
ans = []
b = ""
for i in reversed(a):
    ans.append(i)
for j in range(n):
    if j != n-1:
        b += str(ans[j])+" "
    else:
        b += str(ans[j])
print b

Submission status: Accepted

Solution code:
import sys

l = []
for i in sys.stdin:
    l.append(i)

for i in range(1,len(l),2):
    a = l[i].split()
    a = a[::-1]
    for j in range(0,len(a)):
        print(int(a[j]),end='')
        if j < len(a) - 1:
            print(" ",end='')
    print()

Submission status: Accepted

Solution code:
n = input()
An = input().split()
ans = ""
for x in An:
    ans = x + ans
    ans = " " + ans
ans = ans[1:]
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
num = [int(i) for i in input().split()]
print(' '.join(str(i) for i in num[::-1]))

Submission status: Accepted

Solution code:
n = int(input())
num = [int(i) for i in input().split()]
for i in range(round(len(num)/2)):
    num[i],num[len(num)-i-1] = num[len(num)-i-1],num[i]
print(' '.join(str(i) for i in num))

Submission status: Accepted

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

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

for i in range(n):

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
a.reverse()
str = ""
for d in a:
    str +="%d "%(d)

print(str[:-1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#! python3
# reversing_numbers.py

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

a=input().split()
b=[]
c=[]
i=0
while i<n:
    b.append(int(a[i]))
    i+=1

answer=str(b[n-1])
while n>1:
    answer=answer+" "+str(b[n-2])
    n=n-1
print(answer)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def numinput():
    a = input().split()
    return a
   
def main():
    n = int(input())
    a = numinput()
    a.reverse()
    answer = a[0]
    for i in range(1, len(a)):
        answer += " " + a[i]
    print(answer)
   
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
input()

list = ' '.join(input().split()[::-1])

print(list)

Submission status: Accepted

Solution code:
input()

list = ' '.join(input().split()[::-1])

print(list)

Submission status: Accepted

Solution code:
input()
nums = [input_str for input_str in input().split()]
print(" ".join(nums[::-1]))

Submission status: Accepted

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

n.reverse()

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

Submission status: Accepted

Solution code:
input()

list = ' '.join(input().split()[::-1])

print(list)

Submission status: Accepted

Solution code:
if __name__=='__main__':
  n = int(raw_input())
  nums = [int(x) for x in raw_input().split(' ')]
  if len(nums) != n:
    exit(1)
  print " ".join(str(x) for x in reversed(nums))

Submission status: Accepted

Solution code:
n = int(input())
a = [int(n) for n in input().split()]
for i, num in enumerate(reversed(a)):
    if i == n - 1:
        print(num)
    else:
        print(num, end=' ')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

x = input()
a = input().split()
a = a[::-1]
b = ""
for i in range(len(a)):
   b += a[i]+" "
print(b[:-1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
n = int(input())
arr = list(map(int, input().split()))

for i in range(n):
	sys.stdout.write(str(arr[n - i - 1]))
	if i != n - 1:
		sys.stdout.write(' ')
print()

Submission status: Accepted

Solution code:
#
import sys

n = raw_input()
numbers = raw_input().split()
print " ".join(reversed(numbers))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
a.reverse()
for y,x in enumerate(a):
    if y+1 == len(a):
        print(x)
    else:
        print(x, end=" ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Reversing Numbers

length = int(input())
array = [int(i) for i in input().rstrip().split()]

reversedArray = [0 for i in range(length)]
for i, a in enumerate(array):
    reversedArray[(length - 1) - i] = a

answer_list = [str(n) for n in reversedArray]
print(' '.join(answer_list))

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int, input().split()))
x = []
for i in range(n):
    x.append(l[n-1-i])
for s in x:
    if(s == x[n-1]):
        print('{}'.format(s))
    else:
        print('{}'.format(s), end=" ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    x = int(input())
    numlist = list(map(int, input().split()))
    for i in range(1, x+1):
        if i == x:
            print(numlist[x-i], end="\n")
        else:
            print(numlist[x-i], end=" ")

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def reverse(lst):
    if len(lst) == 0:
        return []

    head, *tail = lst

    return reverse(tail) + [head]

n   = input()
lst = input().split()

print(' '.join([str(i) for i in reverse([int(x) for x in lst])]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
x = []
for line in sys.stdin:
    x.extend([int(s) for s in line.split()])

for e in x[1:][::-1]:
    print e,
print

Submission status: Accepted

Solution code:
n = raw_input().split()
x = map(int, raw_input().split())

lx = len(x)
for i in range(1,lx)[::-1]:
    print x[i],
print x[0]

Submission status: Accepted

Solution code:
n = raw_input().split()
x = raw_input().split()[::-1]

print " ".join(x)

Submission status: Accepted

Solution code:
n = raw_input().split()
x = raw_input().split()

print " ".join(reversed(x))

Submission status: Accepted

Solution code:
n = raw_input().split()
x = raw_input().split()

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

Submission status: Accepted

Solution code:
n=input()
print " ".join(reversed([v for v in raw_input().split()]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from __future__ import division, print_function
from sys import stdin
stdin.readline()
print(*reversed(stdin.readline().split()))

Submission status: Accepted

Solution code:
import sys
for lineCnt, line in enumerate(sys.stdin):
    if lineCnt == 0: continue
    print ' '.join(reversed(line.rstrip('\n').split(' ')))