#include <bits/stdc++.h>
inline void Solve() {
  long long n, x, y;
  scanf("%lld%lld%lld", &n, &x, &y);
  printf("%lld %lld\n",
         n - std::max(1ll, std::min(n, n - x + 1 + n - y + 1 - 2)) + 1,
         std::min(n, x + y - 1));
}
signed main() {
  long long T;
  scanf("%lld", &T);
  while (T--) Solve();
  return 0;
}
