#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int N;
  cin >> N;
  for (int LAMBDA = 1; LAMBDA <= N; LAMBDA++) {
    long long n, r1, r2;
    cin >> n >> r1 >> r2;
    long long s = r1 + r2;
    long long best = max((long long)1, min(n, 1 + s - n));
    long long worst = min(r1 + r2 - 1, n);
    cout << best << " " << worst << "\n";
  }
}
