s=list(input()) if s[len(s)-2] =='a' and s[len(s)-1] =='i': del s[len(s)-2:len(s)] s.append("AI") else: s.append("-AI") print("".join(s))