#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, x, y;
  cin >> n >> x >> y;
  int min_place, max_place;
  int A1 = x - 1, A2 = n - x;
  int B1 = y - 1, B2 = n - y;
  if (A1 < B2) {
    min_place = 1;
    max_place = 1 + A1 + B1;
  }
  if (A1 >= B2) {
    min_place = min(1 + A1 - B2 + 1, n);
    max_place = n;
  }
  cout << min_place << " " << max_place << endl;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(0);
  std::cout.tie(0);
  int T;
  cin >> T;
  while (T--) solve();
  return 0;
}
