#include <bits/stdc++.h>
using namespace std;
int main() {
  long long test, n, a, b, highest, lowest;
  cin >> test;
  while (test--) {
    cin >> n >> a >> b;
    if ((a + b) < n + 1) {
      highest = (a + b) - 1;
    } else {
      highest = n;
    }
    if ((a + b) < n + 1) {
      lowest = 1;
    } else {
      if (a + b + 1 > (n + n))
        lowest = n;
      else
        lowest = (a + b + 1) - n;
    }
    cout << lowest << " " << highest << endl;
  }
  return 0;
}
