Go: package main

import (
	"bufio"
	"fmt"
	"math/big"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)

	const maxCapacity = 512 * 1024
	buf := make([]byte, maxCapacity)
	scanner.Buffer(buf, maxCapacity)

	n := nextInt()
	maxint, _ := new(big.Int).SetString("100000000000000000000000000000000000000000000000000000000000000000000000000000000", 10)

	for i := 0; i < n; i++ {
		aStr := nextString()
		bStr := nextString()

		a, _ := new(big.Int).SetString(aStr, 10)
		b, _ := new(big.Int).SetString(bStr, 10)
		c := big.NewInt(0).Add(a, b)

		if c.Cmp(maxint) < 0 {
			fmt.Println(c)
		} else {
			fmt.Println("overflow")
		}
	}
}

C++: #include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<iostream>
#include<queue>
#include<map>
#include<set>
#include<complex>
#include<stack>
  
using namespace std;
  
int main(){
      
    int n;
    cin>>n;
      
    while(n-- > 0){
        vector<int> ans;
        vector<int> a;
        vector<int> b;
          
        string c,d;
        cin>>c>>d;
          
        for(int i = 0; i < (int)c.size(); ++i){
            a.push_back(c[c.size()-1-i]-'0');
        }
        for(int i = 0; i < (int)d.size(); ++i){
            b.push_back(d[d.size()-1-i]-'0');
        }
          
          
        int kuri = 0;
        while(!a.empty() || !b.empty() || kuri!=0){
            int sum = kuri;
            kuri = 0;
              
            if(!a.empty()){
                sum += a[0];
                a.erase(a.begin());
            }
              
            if(!b.empty()){
                sum += b[0];
                b.erase(b.begin());
            }
              
            ans.push_back(sum%10);
            kuri += sum/10;
        }
          
        if(ans.size()>80)puts("overflow");
        else{
            for(int i = 0; i < (int)ans.size(); ++i){
                printf("%d",ans[ans.size()-1-i]);
            }puts("");
        }
    }
      
}
 
/*
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
 
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
     
    int n;
    cin >> n;
     
    while(n-- > 0){
     
    string str1;
    cin >> str1;
     
    string str2;
    cin >> str2;
     
    reverse(str1.begin(), str1.end());
    reverse(str2.begin(), str2.end());
     
    int check;
    if(str1.size() > str2.size()){
        check = 1;
    }
    else if(str1.size() == str2.size()){
        check = 2;
    }
    else {
        check = 3;
    }
     
    int ans[100];
    bool next = false;
    int short_ = min(str1.size(), str2.size());
    int long_ = max(str1.size(), str2.size());  
    if(long_ >= 80){
        cout << "overflow" << endl;
        continue;
    }
 
    for(int i = 0; i < short_; ++i){
        int num = 0;
        num += (str1[i] - '0') + (str2[i] - '0');
        if(next){
            num++;
        }
        ans[i] = num;
        next = false;   
        if(num >= 10){
            num -= 10;
            ans[i] -= 10;
            next = true;
        }
    }
     
    if(check == 1){
        for(size_t i = str2.size(); i < str1.size(); ++i){
            int num = str1[i] - '0';
            if(next){
                num++;
            }
            ans[i] = num;
            next = false;   
            if(num >= 10){
                num -= 10;
                ans[i] -= 10;
                next = true;
            }
        }
        if(next){
            ans[str1.size()] = 1;
            long_ ++;
        }
    }   
     
    if(check == 3){
        for(size_t i = str1.size(); i < str2.size(); ++i){
            int num = str2[i] - '0';
            if(next){
                num++;
            }
            ans[i] = num;
            next = false;   
            if(num >= 10){
                num -= 10;
                ans[i] -= 10;
                next = true;
            }
        }
        if(next){
            ans[str2.size()] = 1;
            long_ ++;
        }
    }
     
    if(long_ >= 80){
        cout << "overflow" << endl;
        continue;
    }
 
    for(int i = long_ - 1; i >= 0; --i){
        cout << ans[i];
    }   
    cout << endl;
    }
         
    return 0;
}

C++: #include<iostream>
#include<string>
#include<vector>
using namespace std;
int main(){
	string a,b;
	vector<int> ans;
	int n,tmp,carry,num;
	bool flag = true;
	cin >> n;
	for(int i=0; i<n; i++){
		ans.clear();
		cin >> a >> b;
		int ai = a.size()-1;
		int bi = b.size()-1;
		carry=0;
		if(ai < 0 && bi < 0 && carry==0){
			flag = false;
		}
		while(ai >= 0 || bi >= 0){
			tmp=0;
			if(ai >= 0) tmp += a[ai] - '0';
			if(bi >= 0) tmp += b[bi] - '0';
			ans.push_back((tmp+carry)%10);
			carry = (tmp+carry)/10;
			ai--; bi--;
		}
		if(carry != 0) ans.push_back(carry);
		if(flag == true){
			if(ans.size() > 80){
				cout << "overflow" << endl;
				flag = false;
			}
			else{
				for(int j=ans.size()-1; j>=0; j--)
					cout << ans[j];
				cout << endl;
			}
		}
	}
	return 0;
}

C++: #include<iostream>
#include<string>
#include<iomanip>
#include<cmath>
using namespace std;

int main(){

	int n;

	string a, b;
	char N1[80], N2[80];
	char sum[80], temp[82];
	string ans;

	cin >> n;

	for( int i=0;i<n;i++ ){

		cin >> a;
		
		cin >> b;

		if( a.length() > 80 ){
			cout << "overflow" << endl;
			continue;
		}

		if( b.length() > 80 ){
			cout << "overflow" << endl;
			continue;
		}

		for( int i=0;i<80;i++ ){
			N1[i] = -1; N2[i] = -1; sum[i] = 0;
		}

		for( int i=1;i<=a.length();i++ )
			N1[i] = a[a.length()-i] - '0';
		for( int i=1;i<=b.length();i++)
			N2[i] = b[b.length()-i] - '0';

		int over = 0;
		
		for( int i=0;i<80;i++ ){


			if( N1[i] == -1 && N2[i] == -1 ){
				if( over >= 10 ){
					sum[i] = over / 10;
					over = 0;
				}else
					sum[i] = -1;
				continue;
			}

			if( N1[i] != -1 )
				sum[i] += N1[i];
			if( N2[i] != -1 )
				sum[i] += N2[i];

			sum[i] += over / 10;

			over = floor((double)sum[i]/10)*10;

			sum[i] -= over;
			
		}

		if(over > 0)cout << "overflow" << endl;
		else{
			int j=0;
			for( int i=1;i<80;i++ ){
				if( sum[80-i] >= 0 ){
					temp[j] = sum[80-i] + '0';
					j++;
					continue;
				}
				
			}
			temp[j] = '\0';

			ans = temp;

			


			cout << ans << endl;
		}

	}
	return 0;
}

C++: #include "bits/stdc++.h"

#define debug(x) cout<<#x<<": "<<x<<endl
#define rep(i,n) for (int i=0;i<(n);i++)
#define FOR(i,a,b) for (int i=(a);i<=(b);i++)
#define all(a) (a).begin(),(a).end()
using namespace std;
typedef vector<int> VI;
typedef vector<vector<int>> VVI;
typedef long long ll;

void solve() {
#ifdef _WIN32
	istream &cin = ifstream("input.txt");
#endif
	int n;
	cin >> n;
	rep(i, n) {
		vector<int> v1(101), v2(101);
		string s1, s2;
		cin >> s1 >> s2;

		rep(j, s1.size()) v1[j] = s1[s1.size() - j - 1] - '0';
		rep(j, s2.size()) v2[j] = s2[s2.size() - j - 1] - '0';
		
		rep(j, 100) {
			v1[j] += v2[j];
			if (v1[j] >= 10) {
				v1[j] -= 10;
				v1[j + 1]++;
			}
		}
		int digit = 0;
		for (int j = 100; j >= 0; j--) {
			if (v1[j] != 0) {
				digit = j;
				break;
			}
		}
		if (digit >= 80) cout << "overflow" << endl;
		else {
			for (int j = digit; j >= 0; j--) cout << v1[j];
			cout << endl;
		}
	}

}




int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);


	solve();
	//system("PAUSE");
	return 0;
}