#include int main(void) { int i, flag = 1; char s[400000]; scanf("%s", s); i = 0; while(s[i] != 0){ if(s[i] == ',' && (s[i - 1] == 'A' || s[i - 1] == 'E')){ printf("Failed...\n"); flag = 0; break; } i++; } if(flag == 1 && (s[i - 1] == 'A' || s[i - 1] == 'E')){ printf("Failed...\n"); flag = 0; } if(flag == 1){ printf("Done!\n"); } return 0; }