Given an Integer N, write a program to reverse it.

-----Input-----

The first line contains an integer T, total number of testcases. Then follow T lines, each line contains an integer N. 

-----Output-----
For each test case, display the reverse of the given number N, in a new line.

-----Constraints-----
- 1 ≤ T ≤ 1000
- 1 ≤ N ≤ 1000000

-----Example-----
Input
4
12345
31203
2123
2300
Output
54321
30213
3212
32

Difficulty: interview

Starter code:

Solutions:
# cook your dish here
x=int(input())
for i in range(x):
    s=input()
    print(int(s[::-1]))


# cook your dish here
n=int(input())
a=[]
for i in range (0,n):
    no=int(input())
    a.append(no)
for i in range (0,n):
    c=0
    s=0
    while (a[i]!=0):
        c=a[i]%10
        s=s*10+c
        a[i]=a[i]//10
    print(s)

t=eval(input())
for i in range(t):
    n=eval(input())
    rev=0
    while(n>0):
        rem=n%10
        rev=rev*10+rem
        n=n//10
    print(rev)


t=int(input())
for i in range(t):
    n=int(input())
    r=0
    while n>0:
        p=n%10
        r=r*10+p
        n//=10
    print(r)


n= int(input())
for i in range(n):
   a= input()
   a=a[::-1]
   print(int(a))

a=int(input(""))
l=[]
for m in range(a):
    b=input("")
    l.append(b)
for m in range(a):
    n=list(l[m])
    n.reverse()
    s=""
    for t in n:
        s=s+t
    w=int(s)
    print(w)

# cook your dish here
n = int(input())
while n>0:
    x = input()
    print(int(x[::-1]))
    n = n-1



for _ in range(int(input())): 
    n=input()
    a=n[::-1]  
    k = 0 ;
    for i in a:  
        if i =='0': 
            k += 1 ;
        else:   
            break
        
    print(a[k:])



for _ in range(int(input())): #test_cases
    n=input()
    a=n[::-1]  #reverse and store
    k = 0 ;
    for i in a:  #loop through to remove zeroes at the beginning
        if i =='0': #delete the character from the string
            k += 1 ;
        else:   #exit as soon as a non zero number is found :)
            break
        
    print(a[k:])

# cook your dish here
for i in range(int(input())):
    n=int(input())
    rev_num=0
    while n>0:
        a=n%10
        rev_num=rev_num*10+a
        n=n//10
        
    
    print(rev_num)


n=int(input())
for i in range(n):
    k=int(input())
    while 1:
        if k%10==0:
            k=int(k/10)
        else:
            break
    k=str(k)
    print(k[::-1])

# cook your dish here
t=int(input())
for i in range(t):
    s=input()
    n=int(s[::-1])
    print(n)


# cook your dish here
t = int(input())
for i in range(t):
    n = input()
    print(n[::-1].strip("0"))

# cook your dish here
t = int(input())
while t:
    t-=1
    n = str(input())
    
    print(int(n[::-1]))

arr=[]
for a in range(int(input())):
    arr.append(int("".join(reversed(input()))))
print(*arr, sep='\n')


for _ in range (int(input())):
    s = int(input())
    rev = 0
    while(s>0):
        rev = rev*10 + s%10
        s = s//10 
    print(rev)


# cook your dish here
T=int(input())
for i in range(T):
    i=input()
    revi=i[::-1]
    print(int(revi))

# cook your dish here
t=int(input())
while t>0:
    n=int(input())
    tmp=int(n)
    r=0
    while tmp>0:
        d=int(tmp%10)
        r=int(r*10+d)
        tmp=int(tmp/10)
    print(r)
    t-=1

# cook your dish here
x=int(input())
for i in range(x):
    y=input()
    print(y[::-1].lstrip('0'))


# cook your dish here
T=int(input())
for i in range(0,T):
    x=input()
    x=x[::-1]
    print(int(x))


# cook your dish here
N = int(input())
for i in range(N):
    x = input()
    print(int(x[::-1]))

# cook your dish here
T=int(input())
for i in range(0,T):
    N=int(input())
    num=0
    while (N):
        mod= int(N%10)
        num = int((num*10)+ mod) 
        N = int(N/10)
    print(num)

# cook your dish here
for I in range(int(input())):
      num=int(input())
      rev=0
      while num!=0:
        rev=(rev*10)+(num%10)
        num=num//10
      print(rev)


# cook your dish here

for t in range(int(input())):
    num = int(input())
    reverse = int(str(num)[::-1])
    print(reverse)
   


T = int(input())

for i in range(T):
    N = input()
    N = N[None:None:-1]
    print(int(N))