S = input() if S[-1] == "i" and S[-2] == "a": S = S.rstrip("ai") + "AI" else: S = S + "-AI" print(S)