#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int q;
  cin >> q;
  while (q--) {
    long long int n, s, t;
    cin >> n >> s >> t;
    if (t == n && s >= n) {
      cout << "1" << endl;
    } else if (t == n && s < n) {
      cout << n - s + 1 << endl;
    } else if (s >= n && t < n) {
      cout << n - t + 1 << endl;
    } else {
      long long int com = s + t - n;
      if (com > 0) {
        s = s - com;
        t = t - com;
      }
      cout << max(s, t) + 1 << endl;
    }
  }
}
