#include <bits/stdc++.h>
using namespace std;
const int N = (int)3e5 + 5;
const int inf = (int)1e9 + 7;
int t, n, x, y;
int solve_min() {
  int ls = (y == n ? n - 1 : n);
  int lf = 1, rg = n;
  int ans = n;
  while (lf <= rg) {
    int mid = (lf + rg) >> 1;
    if (mid + ls > x + y) {
      int bad = mid - 1;
      if (bad >= x) {
        --bad;
      }
      ans = min(ans, bad + 1);
      rg = mid - 1;
    } else {
      lf = mid + 1;
    }
  }
  return ans;
}
int solve_max() {
  int ls = (y == 1 ? 2 : 1);
  int lf = 1, rg = n;
  int ans = 1;
  while (lf <= rg) {
    int mid = (lf + rg) >> 1;
    if (mid + ls <= x + y) {
      int bad = mid;
      if (mid >= x) {
        bad--;
      }
      ans = max(ans, bad + 1);
      lf = mid + 1;
    } else {
      rg = mid - 1;
    }
  }
  return ans;
}
void solve() {
  scanf("%d %d %d", &n, &x, &y);
  if (n == 1) {
    printf("1 1\n");
    return;
  }
  printf("%d %d\n", solve_min(), solve_max());
}
int main() {
  scanf("%d", &t);
  while (t--) {
    solve();
  }
  return 0;
}
