S = str(input()) if S[-2:] == "ai": S = S[:-2] + "AI" else: S += "-AI" print(S)