#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, x, y;
    cin >> n >> x >> y;
    int big, sml;
    sml = min(x + y - 1, n);
    if (x + y <= n)
      big = 1;
    else
      big = min(x + y - n + 1, n);
    cout << big << ' ' << sml << endl;
  }
}
