#include <bits/stdc++.h>
using namespace std;
const long long M = 1e9 + 7;
const long long MM = 998244353;
void solve() {
  long long n, x, y;
  cin >> n >> x >> y;
  long long t = x + y;
  long long k = min(n, t);
  cout << min(n, t - k + 1) << " ";
  long long r = min(t - 1, n);
  cout << r << "\n";
  return;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  cin >> t;
  while (t--) solve();
  return 0;
}
