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