M = input() length = len(M) ai = M.rfind("ai") if ai == length - 2: M = M.rstrip("ai") print(M + "AI") else: print(M + "-AI")