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