#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int arr[n];
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
    }
    int n1 = n + 1;
    int ans;
    while (n1--) {
      int cnt = 0;
      for (int i = 0; i < n; i++) {
        if (arr[i] >= n1) cnt++;
      }
      if (cnt >= n1) {
        ans = n1;
        break;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
