#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x7f7f7f7f;
long long q, n, x, y;
long long mn, mx;
signed main() {
  cin >> q;
  while (q--) {
    cin >> n >> x >> y;
    mn = min(max(x + y + 1 - n, 1ll), n);
    mx = max(min(x + y - 1, n), 1ll);
    cout << mn << ' ' << mx << endl;
  }
  return 0;
}
