#include <iostream>
#include <string>
#include <cstdlib>
#include <sstream>
#include <math.h>
using namespace std;

int main()
{
	int n;
	cin >> n;
	for (int kk = 0; kk < n; ++kk)
	{
		int A[1000] = {},B[1000] = {},C[1000] = {},keta = 0;
		string in1,in2;
		cin >> in1 >> in2;
		if(in1.size() >= 80 || in2.size() >= 80)
		{
			cout << "overflow" << endl;
			continue;
		}
		for (int i = 0; i < in1.size(); ++i)
			A[in1.size()-i] = (int)(in1[i]-'0');
		for (int i = 0; i < in2.size(); ++i)
			B[in2.size()-i] = (int)(in2[i]-'0');
		bool flag = 1;
		for (int i = 1; i < 1000; ++i)
		{
			C[i] += A[i]+B[i];
			if(C[i] >= 10)
			{
				C[i+1] += C[i]/10;
				C[i] -= C[i]/10*10;
			}
			if(C[i] != 0)
				keta = i;
		}
		if(keta >= 80)
		{
			cout << "overflow" << endl;
			continue;
		}
		cout << "[" << keta << "]" << endl;
		for (int i = keta; i > 0; --i)
		{
			cout << C[i];
		}
		cout << endl;
	}
}