#include using namespace std; int main(){ string s;cin>>s; string z = ""; for(int i = 0; s.size() > i; i++){ if(s[i] == ','){ if(z != "AC"){ cout << "Failed..." << endl; return 0; } z = ""; }else{ z = z+s[i]; } } if(z != "AC")cout << "Failed..." << endl; else cout << "Done!" << endl; }