A reversed arabic no is one whose digits have been written in the reversed order. However in this any trailing zeroes are omitted. The task at hand here is a simple one. You need to add two numbers which have been written in reversed arabic and return the output back in reversed arabic form, assuming no zeroes were lost while reversing.
-----Input-----
The input consists of N cases. The first line of the input contains only a positive integer N. Then follow the cases. Each case consists of exactly one line with two positive integers seperated by space. These are the reversednumbers you are to add.
-----Output-----
For each case, print exactly one line containing only one integer- the reversed sum of two reversed numbers. Omit any leading zeroes in the output.
-----Example-----
Input:
1
24 1
Output:
34
#/usr/bin/python

def main():
 test = int(input())
 for i in range(test):
  x = input()
  l = x.split()
  a = str(l[0])
  b = str(l[1])
  a = a[::-1]
  b = b[::-1]
  c = int(a) + int(b)
  s = str(c)
  s = s[::-1]
  print(int(s))

def __starting_point():
  main()


__starting_point()
#/usr/bin/python

def main():
 test = int(input())
 for i in range(test):
  x = input()
  l = x.split()
  a = str(l[0])
  b = str(l[1])
  a = a[::-1]
  b = b[::-1]
  c = int(a) + int(b)
  s = str(c)
  s = s[::-1]
  print(int(s))

def __starting_point():
  main()


__starting_point()