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