s = input() s = list(s.split(",")) flag = 0 for st in s: if st != "AC": flag=1 if flag == 1: print("Failed...") else: print("Done!")