#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n, x, y;
    cin >> n >> x >> y;
    int minpos = max(1, min(n, x + y - n + 1)), maxpos = min(n, x + y - 1);
    cout << minpos << ' ' << maxpos << '\n';
  }
  return 0;
}
