#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n, x, y, mn, mx;
    cin >> n >> x >> y;
    if (x == n && y == n) {
      cout << n << " " << n << "\n";
      continue;
    }
    if (y > n - x) {
      mx = n;
    } else {
      mx = x + y - 1;
    }
    if (x <= n - y) {
      mn = 1;
    } else {
      mn = x + y - n + 1;
    }
    cout << mn << " " << mx << "\n";
  }
  return 0;
}
