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