l=list(input().split(',')) s=[i for i in l if i=='AC'] print(['Failed...','Done!'][len(l)==len(s)])