#include <bits/stdc++.h>
using namespace std;
void solve();
using ll = long long;
template <class T = ll>
using V = vector<T>;
using vi = V<int>;
using vl = V<>;
using vvi = V<V<int> >;
constexpr int inf = 1001001001;
constexpr ll infLL = (1LL << 61) - 1;
struct IoSetupNya {
  IoSetupNya() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    cerr << fixed << setprecision(7);
  }
} iosetupnya;
template <typename T, typename U>
inline bool amin(T &x, U y) {
  return (y < x) ? (x = y, true) : false;
}
template <typename T, typename U>
inline bool amax(T &x, U y) {
  return (x < y) ? (x = y, true) : false;
}
template <typename T, typename U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
  os << p.first << " " << p.second;
  return os;
}
template <typename T, typename U>
istream &operator>>(istream &is, pair<T, U> &p) {
  is >> p.first >> p.second;
  return is;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  int s = (int)v.size();
  for (long long i = 0; i < (long long)(s); i++) os << (i ? " " : "") << v[i];
  return os;
}
template <typename T>
istream &operator>>(istream &is, vector<T> &v) {
  for (auto &x : v) is >> x;
  return is;
}
void in() {}
template <typename T, class... U>
void in(T &t, U &...u) {
  cin >> t;
  in(u...);
}
void out() { cout << "\n"; }
template <typename T, class... U>
void out(const T &t, const U &...u) {
  cout << t;
  if (sizeof...(u)) cout << " ";
  out(u...);
}
template <typename T>
void die(T x) {
  out(x);
  exit(0);
}
int main() { solve(); }
using vd = V<double>;
using vs = V<string>;
using vvl = V<V<> >;
template <typename T, typename U>
ll ceil(T a, U b) {
  return (a + b - 1) / b;
}
using P = pair<ll, ll>;
using vp = V<P>;
constexpr int MOD = 1000000007;
void q() {
  long long N, x, y;
  in(N, x, y);
  ll best = max(1LL, min(N, x + y + 1 - N));
  ll worst = min(N, x + y - 1);
  out(best, worst);
}
void solve() {
  int T;
  in(T);
  for (long long i = 0; i < (long long)(T); i++) q();
}
