#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long arr[n], j;
    for (j = 0; j < n; j++) {
      cin >> arr[j];
    }
    sort(arr, arr + n);
    long long m = 1;
    vector<int> ri, cni;
    for (j = 1; j < n; j++) {
      if (arr[j - 1] == arr[j])
        ++m;
      else {
        ri.push_back(arr[j - 1]);
        cni.push_back(m);
        m = 1;
      }
    }
    if (arr[n - 2] == arr[n - 1]) {
      ri.push_back(arr[n - 1]);
      cni.push_back(m);
    } else {
      ri.push_back(arr[n - 1]);
      cni.push_back(1);
    }
    long long a = 0, b = 1;
    for (j = 0; j < ri.size(); j++) {
      a += cni[j];
      if (b + a - 1 >= ri[j]) {
        b += a;
        a = 0;
      }
    }
    cout << b;
    cout << "\n";
  }
  return 0;
}
