#include <bits/stdc++.h>
using namespace std;
const char nl = '\n';
template <typename T>
using min_heap = priority_queue<T, vector<T>, greater<T>>;
template <class T>
bool ckmin(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool ckmax(T& a, const T& b) {
  return a < b ? a = b, 1 : 0;
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int dx[8] = {1, 0, -1, 0, 1, 1, -1, -1},
          dy[8] = {0, 1, 0, -1, -1, 1, -1, 1};
const long long mod = 1e9 + 7;
const int MX = 1e5 + 1;
const long long INF = 1e18 + 5;
void solve() {
  vector<int> a(3);
  for (auto& x : a) cin >> x;
  sort(a.begin(), a.end());
  cout << a[2] << nl;
}
void pre() {}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int T = 1;
  cin >> T;
  pre();
  while (T--) {
    solve();
  }
  return 0;
}
