#include <bits/stdc++.h>
using namespace std;
int T, n, a, b;
int main() {
  cin >> T;
  while (T--) {
    cin >> n >> a >> b;
    if (a > b) swap(a, b);
    cout << min(max(a + b + 1 - n, 1), n) << " " << min(n, a + b - 1) << endl;
  }
  return 0;
}
