#include <bits/stdc++.h>
using namespace std;
int n, x, y;
void work() {
  cin >> n >> x >> y;
  int res = x + y;
  int minn = max(res + 1 - n, 1);
  int maxx = res - 1;
  cout << min(minn, n) << " " << min(maxx, n) << endl;
  return;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    work();
  }
  return 0;
}
