#include <bits/stdc++.h>
using namespace std;
const long long int maxn = 1e5;
const long long int inf = 1e9;
const double pi = acos(-1);
void solve() {
  long long int a, b, c;
  cin >> a >> b >> c;
  cout << (a + b + c - 1) << endl;
}
int main() {
  int t = 0;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
