#include <bits/stdc++.h>
static int solve();
using ll = long long;
int main(int argc, char* argv[]) {
  int tc = 1;
  scanf("%d", &tc);
  while (tc--) solve();
  return 0;
}
static constexpr int MOD = 998244353;
static int solve() {
  int n, x, y;
  scanf("%d %d %d", &n, &x, &y);
  int sum = x + y;
  int min_pos, max_pos;
  if (sum == n + n) {
    min_pos = n;
    max_pos = n;
  } else if (sum <= n) {
    min_pos = 1;
    max_pos = sum - 1;
  } else {
    min_pos = sum - n + 1;
    max_pos = n;
  }
  printf("%d %d\n", min_pos, max_pos);
  return 0;
}
