#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long T;
  cin >> T;
  for (long long tt = (0); tt < (T); ++tt) {
    long long n, a, b;
    cin >> n >> a >> b;
    if (a > b) swap(a, b);
    long long mn, mx;
    if (b == n) {
      mn = min(n, a + 1);
    } else {
      long long c = n - (b + 1);
      long long d = max(0LL, (a - 1) - c);
      mn = 1 + d;
    }
    if (b == n) {
      mx = n;
    } else {
      long long c = n - b;
      long long d = max(0LL, c - (a - 1));
      mx = n - d;
    }
    cout << mn << " " << mx << "\n";
  }
  return 0;
}
