S = list(input()) if S[-1] == "i" and S[-2] == "a": S[-1] = "I" S[-2] = "A" else: S.append("-AI") print("".join(S))