#include <bits/stdc++.h>
using namespace std;
const int INF_INT = 2147483647;
const long long INF_LL = 9223372036854775807LL;
const unsigned long long INF_ULL = 18446744073709551615Ull;
const long long P = 92540646808111039LL;
const long long maxn = 1e5 + 10, MOD = 1e9 + 7;
const int Move[4][2] = {-1, 0, 1, 0, 0, 1, 0, -1};
const int Move_[8][2] = {-1, -1, -1, 0, -1, 1, 0, -1, 0, 1, 1, -1, 1, 0, 1, 1};
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    int s = max(a, max(b, c));
    printf("%d\n", s);
  }
}
