#include <bits/stdc++.h>
using namespace std;
const int N = 1e5;
const int MAX_N = 1e5 + 20;
struct node {
  int x, y;
};
int n, m;
long long a[N];
int main() {
  ios::sync_with_stdio(0);
  int T;
  cin >> T;
  while (T--) {
    cin >> n;
    long long in = 0;
    long long rd = 1;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    sort(a, a + n);
    for (int i = 0; i < n; i++) {
      if (a[i] <= in + rd) {
        in = in + rd;
        rd = 1;
      } else {
        rd++;
      }
    }
    cout << in + 1 << endl;
  }
}
