#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
const int inf = 0x3f3f3f3f;
int arr[maxn];
int main() {
  ios::sync_with_stdio(false);
  int T;
  cin >> T;
  while (T--) {
    int n, x, y;
    cin >> n >> x >> y;
    int sum = x + y - 1;
    if (x + y < n + 1)
      cout << 1 << " ";
    else {
      if (x + y >= 2 * n - 1)
        cout << n << " ";
      else
        cout << x + y - n + 1 << " ";
    }
    if (x + y >= n + 1)
      cout << n << endl;
    else
      cout << sum << endl;
  }
  return 0;
}
