#include <bits/stdc++.h>
using namespace std;
int main() {
  long long test = 1;
  cin >> test;
  while (test--) {
    long long n, x, y, best, worst;
    cin >> n >> x >> y;
    worst = (x + y - 1);
    long long t = x + y;
    best = t - n + 1;
    if (best < 1)
      best = 1;
    else if (best > n)
      best = n;
    if (worst > n)
      worst = n;
    else if (worst < 1)
      worst = 1;
    cout << best << " " << worst << endl;
  }
  return 0;
}
