#include <iostream>
#include <string>
#include <cstring>
using namespace std;
int main()
{
string str; //字符串
while (cin >> str)
{
if (str == "end")
break;
int len = str.length();
int vowels = 0, occurrences = 0; //连续元音数,连续辅音数
int totalVowels = 0; //元音总个数
bool flag = true;
for (int i = 0; i < len; i++)
{
if (str[i] == 'a' || str[i] == 'e' || str[i] == 'i' || str[i] == 'o' || str[i] == 'u')
{
++vowels;
++totalVowels;
occurrences = 0;
}
else
{
++occurrences;
vowels = 0;
}
if (vowels == 3 || occurrences == 3)
flag = false;
}
for (int i = 0; i < len - 1; i++)
{
if (str[i] == str[i + 1])
{
if (str[i] != 'e' && str[i] != 'o')
flag = false;
}
}
if (flag == true && totalVowels > 0)
cout << "<" << str << "> is acceptable." << endl;
else
cout << "<" << str << "> is not acceptable." << endl;
}
return 0;
}
继续加油。