#!/usr/bin/env python3 def judge(status): return all(x == "AC" for x in status) def main(): status = input().split(",") if judge(status): print("Done!") else: print("Failed...") if __name__ == "__main__": main()