s=list(input()) d = len(s.count) a = s.count("A") b = s.count("C") c = s.count(",") if d == a+b+c: print("Done!") else: print("Failed...")