#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long i, j, k, l, m, n, a, b, c, d, cnt = 0, f = 0, sum = 0;
    cin >> n;
    int arr[n];
    for (i = 0; i < n; i++) cin >> arr[i];
    sort(arr, arr + n);
    c = 1, d = 0;
    for (i = 0; i < n; i++) {
      if (c >= arr[i]) {
        c++;
      } else {
        int h = c;
        while (h < arr[i]) {
          h++;
          i++;
          if (i == n) {
            break;
          }
        }
        if (i < n) {
          c = h + 1;
        }
      }
    }
    cout << c << endl;
  }
}
