def main(): s = input().split(',') print('Done!' if s.count('AC') == len(s) else 'Failed...') if __name__ == '__main__': main()