#include <bits/stdc++.h>
using namespace std;
const int maxn = 0x7f7f7f7f;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    long long n, x, y;
    cin >> n >> x >> y;
    long long T = x + y - n + 1;
    if (T <= 0)
      cout << 1;
    else if (T > n)
      cout << n;
    else
      cout << T;
    cout << ' ';
    T = x + y - 1;
    if (T > n)
      cout << n;
    else
      cout << T;
    cout << endl;
  }
}
