#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 int lint; typedef pair P; typedef pair LLP; #define rep(i, n) for (int i = 0; i < n; i++) #define repr(i, n) for (int i = n; i >= 0; i--) #define sort(v) sort((v).begin(), (v).end()) #define reverse(v) reverse((v).begin(), (v).end()) /* vectoral(26); al = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; vectorAL(26); AL = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'}; */ int main() { string S; cin >> S; int Z = S.size(); int z = Z / 3; int cnt = 0; if (!(S[Z - 2] == 'A' && S[Z - 1] == 'C')) { cnt++; } rep(i, z) { if (!(S[i * 3] == 'A' && S[i * 3 + 1] == 'C' && S[i * 3 + 2] == ',')) { cnt++; } } if (cnt) { cout << "Failed..." << endl; } else { cout << "Done!" << endl; } }