#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> granny(n, 0);
    for (int i = 0; i < n; i++) {
      cin >> granny[i];
    }
    sort(granny.begin(), granny.end());
    int corty = 1;
    int i = 0;
    int j = 0;
    while (i < n && j < n && i <= j) {
      if (corty + j - i >= granny[j]) {
        corty += j - i + 1;
        j += 1;
        i = j;
      } else {
        j++;
      }
    }
    cout << corty << endl;
  }
  return 0;
}
