#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long n, x, y;
    cin >> n >> x >> y;
    long long res1 = min(n, max(1LL, x + y + 1 - n));
    long long res2 = min(n, x + y - 1);
    cout << res1 << " " << res2 << endl;
  }
}
