#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int T, n, s, t;
  cin >> T;
  while (T--) {
    cin >> n >> s >> t;
    long long int x = t + s - n;
    t -= x;
    s -= x;
    cout << max(s, t) + 1 << endl;
  }
}
