#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define MAXIMUM (103)

char first[MAXIMUM];
char second[MAXIMUM];
char sum[MAXIMUM];

int digitadd(char * first, int digit1)
{
    int flag;
    //i think the bug came from here
    //if digit1 is actually 0, promblem with flow
    //printf("this funciton2 used,   %s    %d\n", first, digit1);
    if ((first[digit1] - '0') + 1 == 10 && digit1 > 0){
        //kalau 9 tambah 1 jadi 10, and boleh tambah lagi digit kiri
        first[digit1] = '0';
        flag = digitadd(first, digit1 - 1);
        if(flag == 0) return 0;
        else if(flag == 1) return 1;
    }else if((first[digit1] - '0') + 1 == 10 && digit1 == 0){
        //kalau 9 tambah 1 jadi 10 tapi takleh tambah lagi digit kiri
        first[digit1] = '0';
        return 1;
    }
    else if(digit1 < 0){
        //kalau digit dah kurang kosong
        //first[digit1] = '0';
        return 1;
    }
    else{
        //kalau digit tambah tapi tak lebih 10
        //first[digit1] = (first[digit1] - '0') + 1 + '0';
        first[digit1]++;
        return 0;
    }
}

void add(char * first, char * second, char * sum, int digit1, int digit2, int digitsum)
{
    int flag;
    sum[0] = '0';
    //printf("this funciton1 used\n");
    while(1){
        
        //printf("%s\n", sum);
        if((first[digit1] - '0') + (second[digit2] - '0') < 10){
            sum[digitsum] = (first[digit1] - '0') + (second[digit2] - '0') + '0';
           // printf("sum : %s\n", sum);
        }else{
            //printf("digitaddisinvoked : %d[%d] + %d[%d] = %d\n", (first[digit1] - '0'), digit1, (second[digit2] - '0'), digit2, (first[digit1] - '0') + (second[digit2] - '0'));
            sum[digitsum] = (first[digit1] - '0') + (second[digit2] - '0') - 10 + '0';
            //printf("sum : %s\n", sum);
            flag = digitadd(first, digit1 - 1);
            if(flag == 0){
                sum[0] = '0';
            }
            else if(flag == 1){
                sum[0] = '1';
            }
        }
        digit1--;
        digit2--;
        digitsum--;
        //printf("%d   %d   %d\n", digit1, digit2, digitsum);
        if(digit1 < 0 || sum < 0) return;
        if(digit2 < 0) break;
        
    }
    //printf("sum : %s\n", sum);
    while(1){
        sum[digitsum] = first[digit1];
        digit1--;
        digitsum--;
        if(digit1 < 0 || digitsum < 0) return;
    }

}

int main(void)
{
    int length1, length2, finallength, N, i;
    char * point;

    scanf("%d", &N);
    i = 0;
    while (i < N){
        scanf("%s%s", first, second);
        if(strlen(first) > 80 || strlen(second) > 80){
            printf("overflow\n");
            i++;
            continue;
        }
        memset(sum, '0', 103);
        //scanf("%s", second);
        length1 = strlen(first);
        length2 = strlen(second);
        
        if (length1 > length2){
            //printf("first\n");
            sum[length1 + 1] = '\0';
            add(first, second, sum, length1 - 1, length2 - 1, length1);
            
        }else{
            //printf("second\n");
            sum[length2 + 1] = '\0';
            add(second, first, sum, length2 - 1, length1 - 1, length2);
         
        }


        if(sum[0] == '1' ){
            point = &sum[0];
        }else if(sum[0] == '0'){
            point = &sum[1];
        }

        for(finallength = 0; point[finallength] != '\0'; finallength++);
        finallength++;
        if(finallength <= 81) printf("%s\n", point);
        else printf("overflow\n");
        i++;
    }
    return (0);
}



Measured memory_bytes: 1936