#include <bits/stdc++.h>
using namespace std;
void solve() {}
int main() {
  int test = 1;
  cin >> test;
  while (test--) {
    int n, x, y;
    cin >> n >> x >> y;
    int sum = x + y;
    cout << (sum > n ? min(sum - n + 1, n) : 1) << ' ' << min(sum - 1, n);
    solve();
    cout << "\n";
  }
  return 0;
}
