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