print( "Failed..." if any(s!="AC" for s in input() .split(",")) else "Done!")