#include <bits/stdc++.h>
using namespace std;
void fast() {
  ios::sync_with_stdio(0);
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
signed main() {
  fast();
  long long t;
  cin >> t;
  while (t--) {
    long long n, a, b, ans2, ans1, cntob;
    cin >> n >> a >> b;
    ans2 = min(n, a - 1 + b);
    ans1 = n - min(n - 1, n - a + n - b);
    if (a + b > n) ans1++;
    ans1 = min(ans1, n);
    cout << ans1 << " " << ans2 << '\n';
  }
}
