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