#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, temp, cnt = 1, j = 0;
  cin >> n;
  vector<long long int> v;
  for (long long int i = 0; i < n; i++) {
    cin >> temp;
    v.push_back(temp);
  }
  sort(v.begin(), v.end());
  long long int ai = v[0];
  for (long long int tj = 0; tj <= n; tj++) {
    if (tj == n && v[tj - 1] <= tj) {
      cnt = tj + 1;
    } else if (v[tj] != ai) {
      if (v[tj - 1] <= tj)
        cnt = tj + 1;
      else
        ai = v[tj];
    }
  }
  cout << cnt << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
