#include using namespace std; int main() { ios::sync_with_stdio(false); string S; cin >> S; for (int i = 0; i + 2 <= S.size(); i += 2) { if (S[i] == ',') ++i; if (S.substr(i, 2) != "AC") { cout << "Failed..." << endl; return 0; } } cout << "Done!" << endl; return 0; }