#include <bits/stdc++.h>
using namespace std;
int main() {
  int tests;
  cin >> tests;
  while (tests--) {
    int n, s, t;
    cin >> n >> s >> t;
    cout << min(max(s, t) + 1 - (s + t - n), n + (n - s - t) + 1) << endl;
  }
  return 0;
}
