#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using lli = long long int;
using str = string;
const ll MOD = 1e9 + 7;
void solve() {
  ll a, b, c;
  cin >> a >> b >> c;
  cout << a + b + c - 1 << '\n';
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout << setprecision(15) << fixed;
  ll t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
