#include <bits/stdc++.h>
using namespace std;
using VP = vector<pair<long long, long long> >;
using VVP = vector<VP>;
using VI = vector<long long>;
using VVI = vector<VI>;
using VVVI = vector<VVI>;
const int inf = 1e9 + 7;
const long long INF = 1LL << 61;
const long long mod = 1e9 + 7;
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
void solve() {
  int i, j;
  int n, x, y;
  cin >> n >> x >> y;
  int m, M;
  if (x + y >= 1 + n)
    M = n;
  else
    M = x + y - 1;
  if (x + y < 1 + n)
    m = 1;
  else
    m = x + y + 1 - n;
  cout << min(m, n) << " " << M << endl;
}
int main() {
  int i, j;
  int t;
  cin >> t;
  while (t--) solve();
}
