#include <bits/stdc++.h>
using namespace std;
int f(int n, int s, int t) {
  int type_tog;
  type_tog = t - (n - s);
  int res1 = n - type_tog + 1;
  n -= type_tog;
  s -= type_tog;
  t -= type_tog;
  int res2 = max(n - s + 1, n - t + 1);
  return min(res2, res1);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int m;
  cin >> m;
  while (m--) {
    int n, s, t;
    cin >> n >> s >> t;
    cout << f(n, s, t) << "\n";
  }
  return 0;
}
