s=list(input().split(',')) print(['Failed...','Done!'][s.count('AC')==len(s)])