#include <bits/stdc++.h>
using namespace std;
int t, n, x, y;
int main() {
  ios::sync_with_stdio(false);
  cin >> t;
  while (t--) {
    cin >> n >> x >> y;
    if (x > y) swap(x, y);
    if (n - y <= 0)
      cout << min(x + 1, n) << " ";
    else if (n - y <= x - 1)
      cout << max(1, x - n + y + 1) << " ";
    else
      cout << 1 << " ";
    cout << min(n, x + y - 1) << endl;
  }
  return 0;
}
