#include <bits/stdc++.h>
using namespace std;
int x, y, n;
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    scanf("%d%d%d", &n, &x, &y);
    int p = 1;
    int maxx = (x + y) - 1;
    int minn;
    if (x + y <= n)
      minn = 1;
    else
      minn = (x + y) - n + 1;
    minn = max(minn, 1);
    maxx = min(maxx, n);
    minn = min(minn, n);
    printf("%d %d\n", minn, maxx);
  }
  return 0;
}
