#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
long long const INF = 1e19;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int t, n;
  cin >> t;
  while (t--) {
    cin >> n;
    int arr[n];
    for (int i = 0; i < n; i++) cin >> arr[i];
    sort(arr, arr + n);
    int group = 1;
    for (int i = n - 1; i >= 0; i--) {
      if (arr[i] <= (i + 1)) {
        group += (i + 1);
        break;
      }
    }
    cout << group << '\n';
  }
}
