#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int N = 3e5, M = N;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  int t, i, j, n, m;
  cin >> t;
  while (t--) {
    map<int, int> make_pair;
    cin >> n;
    while (n--) {
      cin >> i;
      make_pair[i]++;
    }
    int g = 1, tempg = 1;
    for (auto x : make_pair) {
      int temp = tempg + x.second - 1;
      if (temp >= x.first) g = temp + 1;
      tempg = temp + 1;
    }
    cout << g << "\n";
  }
  return 0;
}
