#include <bits/stdc++.h>
using namespace std;
long long t, n, x, y;
int main() {
  cin >> t;
  long long fi, se;
  while (t--) {
    cin >> n >> x >> y;
    se = (long long)x + y - 1;
    if (se > n) se = n;
    fi = 1;
    if (x + y - n > 0) {
      fi += x + y - n;
    }
    if (fi > n) fi = n;
    cout << fi << " " << se << endl;
  }
  return 0;
}
