#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> A(n);
    for (int i = 0; i < n; i++) cin >> A[i];
    sort(A.begin(), A.end());
    int ans = 1, i = 0;
    while (i < n) {
      if (ans >= A[i]) {
        ans++;
        i++;
      } else {
        int curr = A[i], temp = ans, flag = 0;
        while (temp < curr) {
          if (i == n - 1) {
            flag = 1;
            break;
          }
          curr = A[i + 1];
          temp++;
          i++;
        }
        if (flag)
          break;
        else {
          ans = temp + 1;
          i++;
        }
      }
    }
    cout << ans << endl;
  }
  return 0;
}
