#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
bool isp(int long n) {
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
ll MOD = 1000000007;
const int SINF = 1000000009;
const ll INF = 1000000000000000018;
template <typename T>
void toInt(string s, T &a) {
  istringstream(s) >> a;
}
ll gcd(ll a, ll b) {
  ll t;
  while (a) {
    t = a;
    a = b % a;
    b = t;
  }
  return b;
}
ll sub(ll a, ll b) {
  a -= b;
  a = (a + MOD) % MOD;
  return a;
}
ll mul(ll a, ll b) { return ((a % MOD) * (b % MOD)) % MOD; }
ll add(ll a, ll b) {
  a += b;
  a %= MOD;
  return a;
}
ll lcm(ll a, ll b) { return (a * b) / gcd(a, b); }
ll powr(ll a, ll b) {
  ll x = 1LL;
  while (b) {
    if (b & 1) x = mul(x, a);
    a = mul(a, a), b >>= 1;
  }
  return x;
}
long long int ncr(ll n, ll r) {
  if (n == 1 || r == 0) return 1;
  if (r > n / 2) r = n - r;
  long long ans = 1;
  for (ll i = 1; i <= r; i++) {
    ans *= ((long long)n / i);
    n--;
  }
  return ans;
}
void solve() {
  ll i, j, k, l, m, n, x, y, r, min1, max1;
  cin >> n;
  cin >> x >> y;
  min1 = (x + y <= n ? 1 : min(n, x + y - n + 1));
  max1 = (x + y > n ? n : x + y - 1);
  cout << min1 << " " << max1 << "\n";
}
int main() {
  ll t;
  cin >> t;
  while (t--) solve();
  return 0;
}
