s = input() if s[-2:] == "ai": print("%sAI" % s[:-2]) else: print("%sAI" % s)