Go: package main

import (
        "fmt"
        "bufio"
        "os"
)

func main() {
        var n int
        var a, b string
        sc := bufio.NewScanner(os.Stdin)
        fmt.Scanf("%d", &n)
        for i := 0; i < n; i++ {
                sc.Scan()
                a = sc.Text()
                sc.Scan()
                b = sc.Text()

                if len(a) > len(b) {
                        s := add(a, b)
                        if s[len(a)] > 0 {
                                if len(a) >= 80 {
                                        fmt.Printf("overflow")
                                } else {
                                        for i := 0; i <= len(a);i++ {
                                                fmt.Printf("%d", s[len(a)-i])
                                        }
                                }
                                fmt.Printf("\n")
                        } else {
                                if len(a)-1 >= 80 {
                                        fmt.Printf("overflow")
                                } else {
                                        for i := 0; i < len(a);i++ {
                                                fmt.Printf("%d", s[len(a)-i-1])
                                        }
                                }
                                fmt.Printf("\n")
                        }
                } else {
                        s := add(b, a)
                        if s[len(b)] > 0 {
                                if len(b) >= 80 {
                                        fmt.Printf("overflow")
                                } else {
                                        for i := 0; i <= len(b);i++ {
                                                fmt.Printf("%d", s[len(b)-i])
                                        }
                                }
                                fmt.Printf("\n")
                        } else {
                                if len(b)-1 >= 80 {
                                        fmt.Printf("overflow")
                                } else {
                                        for i := 0; i < len(b);i++ {
                                                fmt.Printf("%d", s[len(b)-i-1])
                                        }
                                }
                                fmt.Printf("\n")
                        }
                }
        }
}

// expects ln > lm
func add(n string, m string) (s [100]int) {
        ln := len(n)
        lm := len(m)
        var sum [100]int

        for i := 0; i < ln; i++ {
                var s, t int
                s = int(n[ln-1-i]) - int('0')

                if lm - 1 - i >= 0 {
                        t = int(m[lm-1-i]) - int('0')
                } else {
                        t = 0
                }

                sum[i+1] = (s + t + sum[i]) / 10
                sum[i] = (s + t + sum[i]) % 10
        }

        return sum
}

C++: #include <bits/stdc++.h>
using namespace std;

#define iota(i,n,b,s) for(int i=int(b);i!=int((b)+(s)*(n));i+=(s))
#define range(i,n,m) iota(i,(((n)>(m))?((n)-(m)):((m)-(n))),(n),((n)>(m)?-1:1))
#define rep(i,n) iota(i,(n),0,1)
#define loop for(;;)

#define INF (1e9)
#define EPS (1e-9)
#define cons(a,b) (make_pair(a,b))
#define car(a) (a.first)
#define cdr(a) (a.second)
#define cadr(a) (car(cdr(a)))
#define cddr(a) (cdr(cdr(a)))
#define all(a) a.begin(), a.end()
#define trace(var) cerr<<">>> "<<#var<<" = "<<var<<endl;

typedef long long Integer;
typedef double Real;
typedef vector<int> vi;
typedef vector<string> vs;
typedef map<string,int> Dictionary;

template<class S, class T>
ostream& operator<<(ostream& os, pair<S,T> p) {
  os << '(' << car(p) << ", " << cdr(p) << ')';
  return os;
}

template<class T>
ostream& operator<<(ostream& os, vector<T> v) {
  os << v[0];
  for (int i=1, len=v.size(); i<len; ++i) os << ' ' << v[i];
  return os;
}

int dx[] = { -1, 0, 1, 0 };
int dy[] = {  0, -1, 0, 1 };

const int BIGINT_UNIT_SIZE = 5;
const int BIGINT_UNIT_MAX = 1e5;

/* read */
int str2int(string s) {
  int r = 0;
  for (int i = 0; i < s.size(); ++i)
    r = r * 10 + int(s[i] - '0');
  return r;
}

struct BigInt {
  bool sign;
  vector<int> body;

  BigInt() : sign(false), body() {}

  BigInt(string s) {
    if (s[0] == '-') {
      sign = false;
      s = s.substr(1, s.size() - 1);
    } else {
      sign = true;
    }
    const int n = s.size();
    for (int idx = n;;) {
      idx -= BIGINT_UNIT_SIZE;
      if (idx >= 0) body.push_back(str2int(s.substr(idx, BIGINT_UNIT_SIZE)));
      else body.push_back(str2int(s.substr(0, idx + BIGINT_UNIT_SIZE)));
      if (idx <= 0) break;
    }
  }

  BigInt(int x) {
    if (x < 0) {
      sign = false;
      x = -x;
    } else {
      sign = true;
    }
    while (x > 0) {
      body.push_back(x % BIGINT_UNIT_MAX);
      x /= BIGINT_UNIT_MAX;
    }
  }

  bool operator>(BigInt);
  bool operator<(BigInt);
  bool operator==(BigInt);
  bool operator!=(BigInt);
  BigInt operator-(void);
  BigInt operator+(BigInt);
  BigInt operator-(BigInt);
  BigInt operator*(BigInt);
};

/* pretty print */
inline string pad(int x) {
  string r = "";
  assert(x >= 0);
  while (x > 0) {
    r = char((x % 10) + '0') + r;
    x /= 10;
  }
  while (r.size() < BIGINT_UNIT_SIZE) r = "0" + r;
  return r;
}
ostream& operator<<(ostream& os, BigInt a) {
  if (a.body.empty()) {
    os << "0";
  } else {
    if (!a.sign) os << '-';
    const int n = a.body.size();
    os << a.body[n-1];
    for (int i = n - 2; i >= 0; --i) os << pad(a.body[i]);
  }
  return os;
}

/* read from stdin */
istream& operator>>(istream& is, BigInt&a) {
  string s; is >> s;
  a = BigInt(s);
  return is;
}

/* comparison */

bool BigInt::operator==(BigInt y) {
  BigInt x = *this;
  if (x.sign != y.sign) return false;
  const int I = x.body.size();
  const int J = y.body.size();
  if (I != J) return false;
  for (int i = 0; i < I; ++i)
    if (x.body[i] != y.body[i]) return false;
  return true;
}

bool BigInt::operator!=(BigInt y) {
  return !(*this == y);
}

bool BigInt::operator<(BigInt y) {
  BigInt x = *this;
  if (x.sign && !y.sign) return false;
  if (!x.sign && y.sign) return true;
  if (!x.sign && !y.sign) return -x > -y;
  const int I = x.body.size();
  const int J = y.body.size();
  if (I < J) return true;
  if (I > J) return false;
  for (int i = I - 1; i >= 0; --i) {
    if (x.body[i] < y.body[i]) return true;
    if (x.body[i] > y.body[i]) return false;
  }
  return false;
}

bool BigInt::operator>(BigInt y) {
  return !(*this == y || *this < y);
}

/* unary */

BigInt BigInt::operator-() {
  BigInt r = *this;
  r.sign ^= true;
  return r;
}

/* binary */

BigInt BigInt::operator+(BigInt x) {
  if (this->sign && !x.sign) {
    return (*this) - -x;
  }
  if (!this->sign && x.sign) {
    return x - -(*this);
  }
  if (!this->sign && !x.sign) {
    return -(-(*this) + -x);
  }

  BigInt y = *this;
  const int I = y.body.size();
  const int J = x.body.size();
  for (int i = 0; i < min(I, J); ++i) {
    y.body[i] += x.body[i];
  }
  for (int i = I; i < J; ++i) {
    y.body.push_back(x.body[i]);
  }
  int carry = 0;
  for (int i = 0; i < y.body.size(); ++i) {
    y.body[i] += carry;
    carry = y.body[i] / BIGINT_UNIT_MAX;
    y.body[i] %= BIGINT_UNIT_MAX;
  }
  if (carry > 0) {
    y.body.push_back(carry);
  }
  return y;
}

BigInt BigInt::operator-(BigInt x) {
  if (this->sign && !x.sign) {
    return (*this) + -x;
  }
  if (!this->sign && x.sign) {
    return -(-(*this) + x);
  }
  if (!this->sign && !x.sign) {
    return -x - -(*this);
  }

  if ((*this) < x) {
    return -(x - *this);
  }

  BigInt y = *this;
  const int I = y.body.size();
  const int J = x.body.size();
  assert(I >= J);
  bool carry = false;
  for (int i = 0; i < I; ++i) {
    y.body[i] -= x.body[i];
    if (carry) {
      y.body[i]--;
      carry = false;
    }
    if (y.body[i] < 0) {
      y.body[i] += BIGINT_UNIT_MAX;
      carry = true;
    }
  }
  assert(!carry);
  while (!y.body.empty() && y.body.back() == 0) y.body.pop_back();
  return y;
}

int main() {

  int n; cin >> n;
  rep (_, n) {
    BigInt x, y;
    cin >> x >> y;
    BigInt z = x + y;
    if (z.body.size() > 80) {
      cout << "overflow" << endl;
    } else {
      cout << z << endl;
    }
  }

  return 0;
}