#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pp = pair<int, int>;
const int maxn = 10000;
const int maxx = 1000000;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  for (int i = 0; i < t; ++i) {
    int n, x, y;
    cin >> n >> x >> y;
    cout << min(n, max(1, x + y + 1 - n)) << ' ' << min(x + y - 1, n) << endl;
  }
  return 0;
}
