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