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