Your favorite shop sells n Kinder Surprise chocolate eggs. You know that exactly s stickers and exactly t toys are placed in n eggs in total.

Each Kinder Surprise can be one of three types:

  * it can contain a single sticker and no toy; 
  * it can contain a single toy and no sticker; 
  * it can contain both a single sticker and a single toy. 



But you don't know which type a particular Kinder Surprise has. All eggs look identical and indistinguishable from each other.

What is the minimum number of Kinder Surprise Eggs you have to buy to be sure that, whichever types they are, you'll obtain at least one sticker and at least one toy?

Note that you do not open the eggs in the purchasing process, that is, you just buy some number of eggs. It's guaranteed that the answer always exists.

Input

The first line contains the single integer T (1 ≤ T ≤ 100) — the number of queries.

Next T lines contain three integers n, s and t each (1 ≤ n ≤ 10^9, 1 ≤ s, t ≤ n, s + t ≥ n) — the number of eggs, stickers and toys.

All queries are independent.

Output

Print T integers (one number per query) — the minimum number of Kinder Surprise Eggs you have to buy to be sure that, whichever types they are, you'll obtain at least one sticker and one toy

Example

Input


3
10 5 7
10 10 10
2 1 1


Output


6
1
2

Note

In the first query, we have to take at least 6 eggs because there are 5 eggs with only toy inside and, in the worst case, we'll buy all of them.

In the second query, all eggs have both a sticker and a toy inside, that's why it's enough to buy only one egg.

In the third query, we have to buy both eggs: one with a sticker and one with a toy.
#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
const long long mod = 1000000007;
long long mpow(long long x, long long n) {
  long long ans = 1;
  while (n != 0) {
    if (n & 1) ans = ans * x % mod;
    x = x * x % mod;
    n = n >> 1;
  }
  return ans;
}
long long inv_mod(long long a) { return mpow(a, mod - 2); }
bool square(long long a) {
  long long n = (long long)sqrt(a);
  return a == n * n;
}
int digitsum(long long N, int a) {
  if (N == 0) return 0;
  int ret = 0;
  ret += digitsum(N / a, a) + N % a;
  return ret;
}
long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; };
long long lcm(long long x, long long y) { return x / gcd(x, y) * y; }
vector<long long> splitint(string n, int a) {
  int Len = n.length();
  if (a < 0 || Len < a) return {-1, -1};
  string left, right;
  if (a != 0) left = n.substr(0, a);
  if (a != Len) right = n.substr(a);
  return {stoll(left), stoll(right)};
}
template <long long mod>
class mint {
 private:
  long long _num;
  mint set(long long num) {
    _num = num % mod;
    return *this;
  }

 public:
  mint() { _num = 0; }
  mint(long long num) { _num = num % mod; }
  mint(const mint &cp) { _num = cp._num; }
  mint operator=(long long x) { return set(x % mod); }
  mint operator+(long long x) { return mint<mod>(_num + (x % mod)); }
  mint operator-(long long x) { return mint<mod>(_num - (x % mod)); }
  mint operator*(long long x) { return mint<mod>(_num * (x % mod)); }
  mint operator/(long long x) { return mint<mod>(_num * inv_mod(x)); }
  mint operator+=(long long x) { return set(_num + (x % mod)); }
  mint operator-=(long long x) { return set(_num - (x % mod)); }
  mint operator*=(long long x) { return set(_num * (x % mod)); }
  mint operator/=(long long x) { return set(_num * inv_mod(x)); }
  mint operator+(mint x) { return mint<mod>(_num + x._num); }
  mint operator-(mint x) { return mint<mod>(_num - x._num); }
  mint operator*(mint x) { return mint<mod>(_num * x._num); }
  mint operator/(mint x) { return mint<mod>(_num * inv_mod(x._num)); }
  mint operator+=(mint x) { return set(_num + x._num); }
  mint operator-=(mint x) { return set(_num - x._num); }
  mint operator*=(mint x) { return set(_num * x._num); }
  mint operator/=(mint x) { return set(_num * inv_mod(x._num)); }
  friend mint operator+(long long x, mint m) {
    return mint<mod>(m._num + (x % mod));
  }
  friend mint operator-(long long x, mint m) {
    return mint<mod>(m._num - (x % mod));
  }
  friend mint operator*(long long x, mint m) {
    return mint<mod>(m._num * (x % mod));
  }
  friend mint operator/(long long x, mint m) {
    return mint<mod>(inv_mod(m._num) * x);
  }
  explicit operator long long() { return _num; }
  explicit operator int() { return _num; }
  friend ostream &operator<<(ostream &os, const mint<mod> &x) {
    os << x._num;
    return os;
  }
  friend istream &operator>>(istream &is, mint<mod> &x) {
    int val;
    is >> val;
    x.set(val);
    return is;
  }
};
class UnionFind {
 private:
  vector<int> Parent;

 public:
  UnionFind(int N) {
    Parent.resize(N);
    for (int i = 0, i_len = (N); i < i_len; ++i) Parent[i] = -1;
  }
  int root(int A) {
    if (Parent[A] < 0)
      return A;
    else
      return Parent[A] = root(Parent[A]);
  }
  int size(int A) { return -Parent[root(A)]; }
  bool connect(int A, int B) {
    A = root(A);
    B = root(B);
    if (A == B) return false;
    if (size(A) < size(B)) swap(A, B);
    Parent[A] += Parent[B];
    Parent[B] = A;
  }
};
class Factorial {
 private:
  vector<long long> fac;

 public:
  Factorial(long long N) {
    fac.push_back(1);
    for (int i = 0; i < N; i++) fac.push_back(fac[i] * (i + 1) % mod);
  }
  long long fact(long long a) { return fac[a]; }
  long long ifact(long long a) { return inv_mod(fac[a]); }
  long long cmb(long long a, long long b) {
    if (a == 0 && b == 0) return 1;
    if (a < b || a < 0 || b < 0) return 0;
    long long tmp = ifact(a - b) * ifact(b) % mod;
    return tmp * fac[a] % mod;
  }
};
class SOSU {
 private:
  vector<long long> Prime_Number;

 public:
  SOSU(int N) {
    set<long long> arr;
    for (int i = 0, i_len = (N - 1); i < i_len; ++i) arr.insert(i + 2);
    while (int n = *arr.begin()) {
      if (n > sqrt(N)) break;
      Prime_Number.push_back(n);
      for (int i = int(1); i < int(N / n + 1); ++i) arr.erase(n * i);
    }
    for (auto itr = (arr).begin(); itr != (arr).end(); ++itr)
      Prime_Number.push_back(*itr);
  }
  long long operator[](int i) { return Prime_Number[i]; }
  int count() { return Prime_Number.size(); }
};
struct Solutions {
  long long napsack(int kinds, int MAX_W, vector<long long> weight,
                    vector<long long> cost) {
    vector<vector<long long>> dp(kinds + 1, vector<long long>(MAX_W + 1, 0));
    for (int i = 0, i_len = (kinds); i < i_len; ++i)
      for (int j = 0, j_len = (MAX_W + 1); j < j_len; ++j) {
        if (j < weight[i])
          dp[i + 1][j] = dp[i][j];
        else
          dp[i + 1][j] = max(dp[i][j], dp[i][j - weight[i]] + cost[i]);
      }
    return dp[kinds][MAX_W];
  }
  long long unlimited_napsack(int kinds, int MAX_W, vector<long long> weight,
                              vector<long long> cost) {
    vector<vector<long long>> dp(kinds + 1, vector<long long>(MAX_W + 1, 0));
    for (int i = 0, i_len = (kinds); i < i_len; ++i)
      for (int j = 0, j_len = (MAX_W + 1); j < j_len; ++j) {
        if (j < weight[i])
          dp[i + 1][j] = dp[i][j];
        else
          dp[i + 1][j] = max(dp[i][j], dp[i + 1][j - weight[i]] + cost[i]);
      }
    return dp[kinds][MAX_W];
  }
  long long Partition_Func(int n, int k) {
    vector<vector<long long>> dp(k + 1, vector<long long>(n + 1, 0));
    dp[0][0] = 1;
    for (int i = int(1); i < int(k + 1); ++i)
      for (int j = 0, j_len = (n + 1); j < j_len; ++j) {
        if (j - i >= 0)
          dp[i][j] = (dp[i][j - i] + dp[i - 1][j]);
        else
          dp[i][j] = dp[i - 1][j];
      }
    return dp[k][n];
  }
  int LCS(string s, string t) {
    int n = s.length(), m = s.length();
    vector<vector<int>> dp(n + 1, vector<int>(m + 1));
    for (int i = 0, i_len = (n); i < i_len; ++i)
      for (int j = 0, j_len = (m); j < j_len; ++j) {
        if (s[i] == t[j])
          dp[i + 1][j + 1] = dp[i][j] + 1;
        else
          dp[i + 1][j + 1] = max(dp[i][j + 1], dp[i + 1][j]);
      }
    return dp[n][m];
  }
  int LIS(vector<long long> a) {
    int n = a.size();
    long long INF = 1 << 28;
    vector<long long> dp(n + 1, INF);
    for (int i = 0, i_len = (n); i < i_len; ++i)
      *lower_bound((dp).begin(), (dp).end(), a[i]) = a[i];
    int k = lower_bound((dp).begin(), (dp).end(), INF) - dp.begin();
    return k;
  }
};
int main() {
  int q;
  cin >> q;
  for (int i = 0, i_len = (q); i < i_len; ++i) {
    int n, s, t;
    cin >> n >> s >> t;
    int both = s + t - n;
    s -= both;
    t -= both;
    int ans = 0;
    ans = max(s + 1, t + 1);
    cout << ans << endl;
  }
}
