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