#include <bits/stdc++.h>
using namespace std;
int t() {
  long long a, b, c;
  cin >> a >> b >> c;
  cout << a + b + c - 1 << "\n";
  return 0;
}
int main() {
  int tt;
  cin >> tt;
  while (tt--) t();
}
