#include <bits/stdc++.h>
using namespace std;
long long a[500005], l[500005], r[500005];
long long suml[500005], sumr[500005];
int32_t main() {
  long long t = 1;
  cin >> t;
  while (t--) {
    long long n, x, y;
    cin >> n >> x >> y;
    cout << max(1LL, min(n, x + y - n + 1)) << " " << min(n, x + y - 1) << "\n";
  }
  return 0;
}
