#include <bits/stdc++.h>
using namespace std;
const long long int N = 1e7 + 10;
signed main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int a, b, c;
    cin >> a >> b >> c;
    cout << a + b + c - 1 << '\n';
  }
  return 0;
}
