# coding: utf-8 S = input().split(",") print("Done!" if len(set(S)) == 1 and list(set(S))[0] == "AC" else "Failed...")