#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, k, l, t, m, h;
  cin >> t;
  for (int i = 1; i <= t; i++) {
    cin >> n;
    int a[n + 1];
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    sort(a, a + n);
    k = 1, h = 0;
    for (int i = 0; i < n; i++) {
      if (a[i] <= k + h) {
        k = k + h + 1;
        h = 0;
      } else
        h++;
    }
    cout << k << endl;
  }
  return 0;
}
