S = input().split(",") N = len(S) check = True for i in range(N): if(S[i] != "AC"): check = False if(check == True): print("Done!") else: print("Failed...")