#include <bits/stdc++.h>
using namespace std;
bool check(char t, char *dictionary) {
  char *i = dictionary;
  for (; (*i != '\0') && (*i != t); ++i)
    ;
  return (*i != '\0');
}
int main() {
  int count = 1;
  vector<int> vec;
  char d[] = {'A', 'E', 'I', 'O', 'U', 'Y', '\0'};
  char all[] = "QAZWSXEDCRFVTGBYHNUJMIKLOP";
  istreambuf_iterator<char> it(cin), end;
  cin.ignore(cin.rdbuf()->in_avail());
  for (; it != end && (cin.rdbuf()->in_avail() != 1); ++it, ++count) {
    const char ch = *it;
    if (!check(ch, all)) --count;
    if (check(ch, d)) vec.push_back(count);
  }
  vec.insert(vec.begin(), 0);
  vec.insert(vec.end(), count);
  int min = 0;
  for (unsigned int i = 0; i < vec.size() - 1; ++i)
    min = ((min > vec[i + 1] - vec[i]) ? min : (vec[i + 1] - vec[i]));
  cout << min << endl;
  return 0;
}
