s = input().split(',') print(['Done', 'Failed'][0 if len(s) == s.count('AC') else 1])