#include <bits/stdc++.h>
using namespace std;
template <typename T>
void read(T &x) {
  x = 0;
  char ch = getchar();
  long long f = 1;
  while (!isdigit(ch)) {
    if (ch == '-') f *= -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - 48;
    ch = getchar();
  }
  x *= f;
}
template <typename T, typename... Args>
void read(T &first, Args &...args) {
  read(first);
  read(args...);
}
template <typename T>
void write(T arg) {
  T x = arg;
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x > 9) {
    write(x / 10);
  }
  putchar(x % 10 + '0');
}
template <typename T, typename... Ts>
void write(T arg, Ts... args) {
  write(arg);
  if (sizeof...(args) != 0) {
    putchar(' ');
    write(args...);
  }
}
const long long MOD = 1e9 + 7;
const int MAXN = 1e5 + 50;
int T, n, a[MAXN];
int main() {
  read(T);
  while (T--) {
    read(n);
    for (register int i = 1; i <= n; ++i) {
      read(a[i]);
    }
    sort(a + 1, a + n + 1);
    int ans = 1, cur = 0;
    for (register int i = 1; i <= n; ++i) {
      int r = 0, flag = 0;
      for (register int j = i; j <= n; ++j) {
        if (a[j] <= ans + r) {
          flag = 1, r += 1, i = j;
          break;
        } else {
          ++r;
        }
      }
      if (!flag) {
        break;
      }
      ans += r;
    }
    write(ans), putchar('\n');
  }
  return 0;
}
