#include <bits/stdc++.h>
using namespace std;
long long q;
long long n, x, y;
int32_t main() {
  cin >> q;
  while (q--) {
    cin >> n >> x >> y;
    cout << max(1ll, min(n, x - (n - y) + 1)) << ' ' << min(n, x + y - 1)
         << '\n';
  }
  return false;
}
