#include <bits/stdc++.h>
using namespace std;
void work() {
  int t;
  cin >> t;
  while (t--) {
    int a, b, c;
    cin >> a >> b >> c;
    cout << min(a, min(b, c)) << endl;
  }
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  work();
  return 0;
}
