prms = input() for p in prms: if p.endswith("ai"): print(p[:-2] + "AI") else: print(p + "-AI")