def main(): s = input() if (s[-2] == "a" and s[-1] == "i"): n = len(s) s = s[0 : n - 2] + "AI" print(s) else: s += "-AI" print(s) main()