#include <bits/stdc++.h>
using namespace std;
namespace my_functions {
long long gcd(long long a, long long b) {
  if (a == 0 || b == 0 || a == b) return a == b ? a : (a > 0 ? a : b);
  return a > b ? gcd(b, a % b) : gcd(a, b % a);
}
bool isPalindrome(long long n) {
  long long t = n;
  queue<long long> q;
  while (t) {
    q.push(t % 10);
    t /= 10;
  }
  while (!q.empty()) {
    t = t * 10 + q.front();
    q.pop();
  }
  return (t == n ? 1 : 0);
}
bool isPalindrome(string s) {
  long long n = s.length();
  bool b = 1;
  for (long long i = 0; i < n; i++) {
    if (s[i] != s[n - 1 - i]) {
      b = 0;
      break;
    }
  }
  return b;
}
bool contains_k(long long n, long long k) {
  if (n == 0 && k == 0) return 1;
  bool b = 0;
  while (n) {
    if (n % 10 == k) b = 1;
    n /= 10;
  }
  return b;
}
long long digits(long long n) {
  long long c = 0;
  while (n) {
    c++;
    n /= 10;
  }
  return c;
}
long long ncr(long long n, long long r) {
  if (n < r) return 0;
  long long ans = 1;
  for (long long i = 0; i < r; i++) {
    ans *= (n - i);
  }
  for (long long i = 0; i < r; i++) {
    ans /= (i + 1);
  }
  return ans;
}
long long factorial(long long n, long long mod) {
  long long ans = 1;
  for (long long i = 1; i <= n; i++) {
    ans = (ans * i) % mod;
  }
  return ans;
}
bool isSorted(long long a[], long long n) {
  long long b = 1;
  for (long long i = 0; i < n - 1; i++) {
    if (a[i + 1] < a[i]) {
      b = 0;
      break;
    }
  }
  return b;
}
bool isSorted(vector<long long> v, long long n) {
  long long b = 1;
  for (long long i = 0; i < n - 1; i++) {
    if (v[i + 1] < v[i]) {
      b = 0;
      break;
    }
  }
  return b;
}
bool isPresent(long long a[], long long n, long long val) {
  bool b = 0;
  for (long long i = 0; i < n; i++) {
    if (a[i] == val) {
      b = 1;
      break;
    }
  }
  return b;
}
long long modular_pow(long long a, long long b, long long c) {
  if (b == 0) return 1;
  if (b % 2 == 0) {
    return modular_pow((a % c * a % c) % c, b / 2, c);
  } else
    return ((a % c) * (modular_pow((a * a) % c, b / 2, c))) % c;
}
long long isSquare(long long n) {
  long long s = sqrt(n);
  return (s * s == n);
}
long long pow_of_p_in_n(long long n, long long p) {
  long long c = 0;
  while (n % p == 0) {
    n /= p;
    c++;
  }
  return c;
}
bool contains(long long a[], long long n, long long v) {
  bool b = 0;
  for (long long i = 0; i < n; i++) {
    if (a[i] == v) {
      b = 1;
      break;
    }
  }
  return b;
}
}  // namespace my_functions
using namespace my_functions;
const long long N = 1e9 + 7;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long n, x, y;
    cin >> n >> x >> y;
    cout << max(x + y + 1 - n, 1ll) - (n == x && n == y) << " "
         << min(x + y - 1, n) << endl;
  }
  return 0;
}
