#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 idx = 0;
    int to = 1;
    int maxi = INT_MIN;
    int sz = 1;
    while (idx < n) {
      while (idx < n && a[idx] > to + sz - 1) {
        idx++;
        sz++;
      }
      if (idx < n && a[idx] <= to + sz - 1) {
        to += sz;
        sz = 0;
      }
      idx++;
      sz = 1;
    }
    cout << to << "\n";
  }
}
