#include <bits/stdc++.h>
using namespace std;
vector<int> inp(int n) {
  vector<int> v;
  int x;
  for (int i = 0; i < n; i++) {
    cin >> x;
    v.push_back(x);
  }
  return v;
}
int main() {
  ios::sync_with_stdio(false);
  std::cin.tie(NULL);
  std::cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n, m;
    cin >> n;
    vector<int> ar = inp(n);
    sort(ar.begin(), ar.end());
    long long int num = 1;
    map<int, int> mp;
    long long int greedy = 0;
    for (int i = 0; i < ar.size(); i++) mp[ar[i]]++;
    for (auto it = mp.begin(); it != mp.end(); ++it) {
      if (num + greedy + it->second - 1 >= it->first) {
        num += it->second + greedy;
        greedy = 0;
      } else
        greedy += it->second;
    }
    cout << num << endl;
  }
  return 0;
}
