#include <bits/stdc++.h>
using namespace std;
const int maxx = 1e6 + 7;
int main() {
  ios::sync_with_stdio(0);
  int t, m, n, a, c, b;
  cin >> t;
  while (t--) {
    int maxn = 0, minn = 0;
    cin >> n >> a >> b;
    if (n == b)
      minn = max(0, n - a - 1);
    else
      minn = n - a;
    cout << n - (min(a - 1, max(n - b - 1, 0)) + minn) << " "
         << min(b - 1, n - a) + a << endl;
  }
}
