#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long a[n];
    for (long long i = 0; i < n; i++) cin >> a[i];
    sort(a, a + n);
    map<long long, long long> mp;
    mp[a[0]]++;
    for (long long i = 1; i < n; i++) {
      mp[a[i]]++;
    }
    auto it = mp.begin();
    auto p = it;
    it++;
    for (auto i = it; i != mp.end(); i++) {
      i->second += p->second;
      p = i;
    }
    long long ans = 0;
    for (auto i = mp.begin(); i != mp.end(); i++) {
      if (i->second < i->first) {
      } else
        ans = i->second;
    }
    cout << ans + 1 << endl;
  }
}
