t = int(input())
for i in range(t):
    nos = list(input().split())
    x = int(nos[0])
    y = int(nos[1])
    z = x+y
    if (len(str(z))==len(str(x))):
        print (z)
    else:
        print(x)

0d6480d37abb3cd6fbd6481e789e8a421537b293
<mask token>

<mask token>
for i in range(t):
    nos = list(input().split())
    x = int(nos[0])
    y = int(nos[1])
    z = x + y
    if len(str(z)) == len(str(x)):
        print(z)
    else:
        print(x)

t = int(input())
for i in range(t):
    nos = list(input().split())
    x = int(nos[0])
    y = int(nos[1])
    z = x + y
    if len(str(z)) == len(str(x)):
        print(z)
    else:
        print(x)

t = int(input())
for i in range(t):
    nos = list(input().split())
    x = int(nos[0])
    y = int(nos[1])
    z = x+y
    if (len(str(z))==len(str(x))):
        print (z)
    else:
        print(x)
