#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, x, y;
  cin >> n >> x >> y;
  long long mn = 0, mx = 0, k = 1;
  if (x > y) swap(x, y);
  mx = min(n, x + y - 1);
  mn = min(n, x + y - n + 1);
  mn = max(k, mn);
  cout << mn << " " << mx << endl;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) solve();
  return 0;
}
