#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
void read1_i(vector<long long> &v, long long n) {
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    v.push_back(x);
  }
}
void read1_c(vector<char> &v, long long n) {
  for (long long i = 0; i < n; i++) {
    char x;
    cin >> x;
    v.push_back(x);
  }
}
void read2_i(vector<vector<long long>> &v, long long n, long long m) {
  for (long long i = 0; i < n; i++) {
    vector<long long> temp;
    for (long long j = 0; j < m; j++) {
      long long x;
      cin >> x;
      temp.push_back(x);
    }
    v.push_back(temp);
  }
}
void read2_c(vector<vector<char>> &v, long long n, long long m) {
  for (long long i = 0; i < n; i++) {
    vector<char> temp;
    for (long long j = 0; j < m; j++) {
      char x;
      cin >> x;
      temp.push_back(x);
    }
    v.push_back(temp);
  }
}
bool isperfectsquare(double n) {
  if (ceil((double)sqrt(n)) == floor((double)sqrt(n))) {
    return true;
  } else {
    return false;
  }
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return ((a / gcd(a, b)) * b); }
bool isPrime(long long n) {
  if (n <= 1) return false;
  for (long long i = 2; i < n; i++)
    if (n % i == 0) return false;
  return true;
}
long long no_dig(long long n) {
  long long no = 0;
  while (n != 0) {
    no++;
    n /= 10;
  }
  return no;
}
long long power(long long a, long long n) {
  if (n == 0) return 1;
  long long subprob = power(a, n / 2);
  if (n & 1) return a * subprob * subprob;
  return subprob * subprob;
}
bool ispalindrome(const string &s) { return s == string(s.rbegin(), s.rend()); }
void solve() {
  long long n;
  cin >> n;
  std::vector<long long> v;
  read1_i(v, n);
  long long count = 0;
  sort(v.begin(), v.end());
  for (long long i = 0; i < n; i++) {
    long long x = v[i];
    long long idx = upper_bound(v.begin(), v.end(), x) - v.begin();
    idx--;
    if (v[i] <= idx + 1) {
      count = idx + 1;
    } else
      continue;
  }
  cout << count + 1 << ("\n");
}
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  long long t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
