#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    long long int a[n];
    for (long long int i = 0; i < n; i++) cin >> a[i];
    sort(a, a + n);
    long long int diff = 1, c = 0, k1 = 1, c1 = 0, flag = 0;
    for (long long int i = 0; i < n; i++) {
      if (a[i] <= diff) {
        c++;
        diff++;
        k1 = diff;
        c1 = c;
      } else {
        k1 = diff;
        c1 = c;
        while (1) {
          if (a[i] <= k1) {
            flag = 1;
            c1++;
            k1++;
            break;
          }
          if (i == n - 1) {
            break;
          }
          k1++;
          c1++;
          i++;
        }
        if (flag) {
          diff = k1;
          c = c1;
          flag = 0;
        }
      }
    }
    cout << c + 1 << endl;
  }
}
