#include <bits/stdc++.h>
using namespace std;
int t;
long long n, a, b;
long long hao, huai;
int main() {
  ios::sync_with_stdio(false);
  cin >> t;
  while (t--) {
    long long x, y;
    cin >> n >> x >> y;
    if (x == 1 && y == 1) {
      cout << "1 1" << endl;
      continue;
    }
    b = max(x, y);
    a = min(x, y);
    long long u = n;
    if (b == n) u--;
    if (a + b < n + 1)
      hao = 1;
    else if (a + b == n + 1)
      hao = 2;
    else {
      long long v = a + b - u + 1;
      if (a <= a + b - u) v--;
      hao = min(n, v);
    }
    if (a + b >= n + 1)
      huai = n;
    else
      huai = a + b - 1;
    cout << hao << " " << huai << endl;
  }
  return 0;
}
