Problem:
National Budget

A country has a budget of more than 81 trillion yen. We want to process such data, but conventional integer type which uses signed 32 bit can represent up to 2,147,483,647.

Your task is to write a program which reads two integers (more than or equal to zero), and prints a sum of these integers.

If given integers or the sum have more than 80 digits, print "overflow".

Input

Input consists of several datasets. In the first line, the number of datasets N (1 ≤ N ≤ 50) is given. Each dataset consists of 2 lines:

The first integer
The second integer

The integer has at most 100 digits.

Output

For each dataset, print the sum of given integers in a line.

Sample Input

6
1000
800
9999999999999999999999999999999999999999
1
99999999999999999999999999999999999999999999999999999999999999999999999999999999
1
99999999999999999999999999999999999999999999999999999999999999999999999999999999
0
100000000000000000000000000000000000000000000000000000000000000000000000000000000
1
100000000000000000000000000000000000000000000000000000000000000000000000000000000
100000000000000000000000000000000000000000000000000000000000000000000000000000000

Output for the Sample Input

1800
10000000000000000000000000000000000000000
overflow
99999999999999999999999999999999999999999999999999999999999999999999999999999999
overflow
overflow

Solution in C (judge verdict: Time Limit Exceeded)

#include <stdio.h>
#include <string.h>
 
int main(void)
{
    unsigned char num1[100],num2[100];
    int ia,ib,i,j,k,l,num,ex,large,small;
    int size1,size2;
    int sum[100];
 
    scanf("%d",&num);//????????????????????°
 
    for (l = 0; l < num; ++l)
    {
        scanf("%s",num1);
        scanf("%s",num2);
 
        size1 = strlen(num1);
        size2 = strlen(num2);
 
        if (size2 >= size1)// ???>??????????????¨?????????????????°???
        {
            large = (size2 - 1);
            small = (size1 - 1);
        }
        else if (size1 >= size2)
        {
            large = (size1 - 1);
            small = (size2 - 1);
        }
 
        //80?????\?????§overflow
        if (large > 80)
        {
            printf("overflow\n");
            continue;
        }
 
 
        //num1?????°?????????????????????******************************************
        for(ia = 0; ia < 100; ia++)
        {
            if(num1[ia+1] == '\0')break;   //NULL?????????????????????????????????
             
            ex = num1[ia];
            num1[ia] = num1[ia+1];
            num1[ia+1] = ex;
        }
 
        for (j = ia; j > 0 ; --j) //ia?????????????????§??????????????£??????
        {
            for (k = 0; k < j-1; ++k) //????????????????????????????????£??????
                                      //??????????????¨??????????????? ?????????????????§
            {
                ex = num1[k];
                num1[k] = num1[k+1];
                num1[k+1] = ex;
            }
        }
 
        j=0;
        k=0;
 
        //num2?????°?????????????????????******************************************
        for(ib = 0; ib < 100; ib++)
        {
            if(num2[ib+1] == '\0')break;   //NULL?????????????????????????????????
             
            ex = num2[ib];
            num2[ib] = num2[ib+1];
            num2[ib+1] = ex;
        }
 
        for (j = ib; j > 0 ; --j) //ib?????????????????§??????????????£??????
        {
            for (k = 0; k < j-1; ++k) //????????????????????????????????£??????
                                      //??????????????¨??????????????? ?????????????????§
            {
                ex = num2[k];
                num2[k] = num2[k+1];
                num2[k+1] = ex;
            }
        }
 
        j=0;
        k=0;
 
 
        //??±????????????????????\???????????????
        //(large???0?????\???????????¨??????????????????????????????)
        if (ia == 0 && ib == 0)
        {
            printf("%d\n", (num1[0]-48) + (num2[0]-48));
            continue;
        }
 
        //??°??????????????\???????????????
        //??\???????¶???????????????????????????????????????????0???????´?
        if (ia != ib)
        {
            for (j = small + 1; j <= large ; ++j)
            {
                if (ia < ib)
                {
                    num1[j] = '0';
                }
                else if (ib < ia)
                {
                    num2[j] = '0';
                }
            }
        }
 
        //?????????
        for (i = 0; i <= large+1; ++i)
        {
            sum[i] = 0;
        }
 
        i = 0;
 
        for (i = 0; i <= large; ++i)
        {
            sum[i] += ((num1[i]-'0') + (num2[i]-'0'));
 
            if (sum[i] >= 10)//??????????????¢??¬??§10?¶?????????????
            {
                sum[i] -= 10;   //??????????????°????????\??????
                sum[i+1] += 1;; //??°?????????
 
                //(???)80 + 50?????????????????????????????´????????????
                if (i == large)
                {
                    large += 1;
                    break;
                }
            }
        }
 
        //?¶????????????????80????¶??????????overflow
        if (large > 80)
        {
            printf("overflow\n");
            continue;
        }
 
        for (i = large; i >= 0; --i)
        {
            printf("%d", sum[i]);
        }
        printf("\n");
 
        i = 0;
 
    }
 
    return 0;
}