s=input() if s[-1]=='i' and s[-2]=='a': s.remove() s.remove() s+="AI" print(s) else: print(s+'-AI')