#include <bits/stdc++.h>
using namespace std;
vector<int> v, q;
long long int n, m, cnt, ans, arr[10003], ram, p, a, b, c, d, e;
float fl, tl, sl, hl;
double gd, fd, sd;
long double k, l, i;
string s, t, z;
set<int> y;
vector<string> h;
pair<long long int, long long int> P;
map<long long int, long long int> mp;
set<long long int, long long int> St;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> m >> cnt >> ans;
    cout << m - min(cnt, ans) - 1 + 2 << endl;
  }
}
