import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] sa = br.readLine().split(","); br.close(); for (int i = 0; i < sa.length; i++) { if (!sa[i].equals("AC")) { System.out.println("Failed..."); return; } } System.out.println("Done!"); } }