#include <bits/stdc++.h>
using namespace std;
int main() {
  int tc;
  cin >> tc;
  while (tc--) {
    int n;
    cin >> n;
    int a[n + 2];
    int b[n + 2];
    for (int i = 0; i < n; i++) cin >> a[i], b[i] = a[i];
    sort(a, a + n);
    int cnt = 1, x, j = n, id = 0;
    for (int i = 0; i < n; i++) {
      if (a[i] <= cnt) {
        cnt++;
      } else if (a[i] > cnt) {
        j = i;
        id = 1;
        break;
      }
    }
    if (id) {
      x = cnt;
      for (int i = j; i < n; i++) {
        if (a[i] <= cnt) {
          cnt++;
          x++;
        } else if (a[i] > x) {
          x++;
        } else if (a[i] <= x) {
          x++;
          cnt = x;
          x = cnt;
        }
      }
    }
    cout << cnt << endl;
  }
  return 0;
}
