#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    long long int arr[n];
    for (long long int i = 0; i < n; ++i) cin >> arr[i];
    sort(arr, arr + n);
    long long int cnt = 1;
    long long int i = 0;
    while (i < n) {
      if (arr[i] <= cnt) {
        cnt++;
        i++;
      } else {
        long long int temp = cnt + 1;
        i++;
        while (i < n) {
          if (arr[i] > temp) {
            temp++;
            i++;
          } else {
            cnt = temp + 1;
            i++;
            break;
          }
        }
      }
    }
    cout << cnt << "\n";
  }
  return 0;
}
