#include <bits/stdc++.h>
using namespace std;
int BestPlace(int n, int x, int y) {
  int sum = x + y;
  if (sum < n + 1)
    return 1;
  else
    return min(n, sum - n + 1);
}
int WorstPlace(int n, int x, int y) {
  int sum = x + y;
  if (sum > n)
    return n;
  else
    return sum - 1;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, x, y;
    cin >> n >> x >> y;
    cout << BestPlace(n, x, y) << ' ' << WorstPlace(n, x, y) << endl;
  }
  return 0;
}
