#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int T;
  cin >> T;
  while (T--) {
    vector<int> a(3);
    for (auto &it : a) {
      cin >> it;
    }
    sort(a.begin(), a.end());
    cout << a[2] << endl;
  }
}
