#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long LL; typedef unsigned long long ULL; #define MEM(a,b) memset((a),(b),sizeof(a)) const LL INF = 1e9 + 7; const int N = 1e3 + 10; int main() { //freopen("input.txt", "r", stdin); //freopen("output.txt", "w", stdout); string s; cin >> s; s += ','; if (s.length() % 3) puts("Failed.."), exit(0); for (int i = 0; i < s.length(); i += 3) { if (s[i] == 'A' && s[i + 1] == 'C' && s[i + 2] == ',') continue; puts("Failed.."); exit(0); } puts("Done!"); return 0; }