#include #include #include #include #include #include #include #include #include using namespace std; bool Check(char c) { switch(c) { case 'a': case 'i': case 'u': case 'e': case 'o': return true; } return false; } int main() { ifstream cin("say.txt"); string str; while(cin >> str) { if(str == "end") break; bool ok = true; int vn = 0; int vc = 0; int cc = 0; char latest = 0; for(int i = 0; i < str.size(); ++i) { if(Check(str[i])) { cc = 0; ++vn; if(++vc >= 3) { ok = false; } } else { vc = 0; if(++cc >= 3) { ok = false; } } if(str[i] == latest && str[i] != 'e' && str[i] != 'o') { ok = false; } latest = str[i]; } if(vn ==0) ok = false; if(ok) cout << "<" << str << "> is acceptable." << endl; else cout << "<" << str << "> is not acceptable." << endl; } }