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