#include <bits/stdc++.h>
using namespace std;
int main() {
  int T, a, b, c;
  cin >> T;
  while (T--) {
    cin >> a >> b >> c;
    int mx = a;
    if (b > mx) mx = b;
    if (c > mx) mx = c;
    cout << mx << endl;
  }
  return 0;
}
