s=list(input().split(",")) for i in s: if i!="AC":print("Failed...");exit() print("Done!")