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