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