s=input();print(s.replace("ai","")+"-AI"[s[-2:]=="ai":])