#include <bits/stdc++.h>
using namespace std;
int32_t 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], j;
    for (j = 0; j < n; j++) {
      cin >> arr[j];
    }
    sort(arr, arr + n);
    long long int total = 1;
    for (j = 0; j < n; j++) {
      long long int count = 0;
      long long int i;
      for (i = j; i < n; i++) {
        count++;
        if (total + count - 1 >= arr[i]) {
          total += count;
          j = i;
          break;
        }
      }
      j = i;
    }
    cout << total << endl;
  }
}
