#include using namespace std; #define rep(i,n) for(int i = 0; i < (n);i++) #define sz(x) int(x.size()) typedef long long ll; typedef pair P; int main(){ string s; cin >> s; int n = sz(s); rep(i,n) { if (i == 0 || s[i-1] == ',') { if (s.substr(i,2) != "AC") { cout << "Failed..." << endl; return 0; } } } cout << "Done!" << endl; return 0; }