#include <bits/stdc++.h>
using namespace std;
inline void fastio() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
void solve() {
  long long n, a, b;
  cin >> n >> a >> b;
  long long s = a + b;
  cout << min(n, 1 + max((long long)0, s - n)) << ' ' << min(n, s - 1) << '\n';
}
signed main() {
  fastio();
  long long t;
  cin >> t;
  while (t--) solve();
}
