#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
const long long int infi = 1e18 + 5;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, i, j;
    cin >> n;
    long long int a[n + 5];
    map<long long int, long long int> mp;
    for (i = 1; i <= n; i++) {
      cin >> a[i];
      mp[a[i]]++;
    }
    sort(a + 1, a + n + 1);
    long long int cnt = 1;
    long long int ans = 1;
    long long int tmp = 1;
    long long int prev = 0;
    for (auto it : mp) {
      long long int fi = it.first;
      long long int si = it.second;
      if (ans + si + prev - tmp >= fi) {
        ans = ans + si + prev;
        prev = 0;
      } else
        prev = prev + si;
    }
    if (ans == 0) ans = 1;
    cout << ans << "\n";
  }
}
