#include using namespace std; using i64 = long long; int main() { string s; cin >> s; if (regex_match(s, regex("AC(,AC)*"))) cout << "Done!" << endl; else cout << "Failed..." << endl; return 0; }