import java.util.*; class Main{ public static void main(String[] $){ var s=new Scanner(System.in); System.out.println(Arrays.stream(s.nextLine().split(",")).allMatch("AC"::equals)?"Done!":"Failed..."); } }