#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
void solve() {
  long long a, b, c;
  cin >> a >> b >> c;
  cout << a + b + c - 1 << endl;
}
int main() {
  ;
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long T = 1;
  cin >> T;
  while (T--) {
    solve();
  }
}
