#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, x, y;
  cin >> n >> x >> y;
  long long int mini = max(1LL, min(n, x + y - n + 1));
  long long int maxi = min(n, x + y - 1);
  cout << mini << " " << maxi << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
