#include int main(){ char a[40000]; int A=0,C=0,ans=1; for(int i = 0;i < 40000;i++){ scanf("%c",a[i]); if(a[i] == 'A')A++; if(a[i] == 'C')A++; if(A == 0,C == 0)ans = 0; } if(ans == 0)printf("Done!"); else printf("Failed..."); return 0; }