import sys def main xr sys stdin xreadlines xr next for in xr one two

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#
import sys
#
def main():
#
xr = sys.stdin.xreadlines()
#
xr.next()
#
for l in xr:
#
one, two = l.split()
#
print int(str(int(one[::-1]) + int(two[::-1]))[::-1])
#
#
#
if __name__ == '__main__':
#
main()