#include<iostream>
#include<string>
#include<cmath>
#include<algorithm>
using namespace std;

int main(){

  string s,t,a,b;
  int n,k;

  cin >> n;

  for(int i=0;i<n;i++){
    cin >> s >> t;

    int z[1000] = {0},x[1000] = {0},c = 0,p = 0;

    for(int i=s.size()-1;i>=0;i--){
      x[p] = s[i] - 48;
      p++;
    }

    p = 0;
    for(int i=t.size()-1;i>=0;i--){
      z[p] = t[i] - 48;
      p++;
    }


    k = max(s.size(),t.size());

    for(int i=0;i<k;i++){
      x[i] += z[i];

      if(x[i] >= 10){
	if(i == k - 1) c = 1;
	x[i] -= 10;
	x[i + 1]++;
      }
    }

    cout << "a" << " " << k+c << endl;

    if(k+c > 80) cout << "overflow" << endl;

    else{
      for(int i=k+c-1;i>=0;i--) cout << x[i];
      cout << endl;
    }
  }
}