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