# -*- coding: utf-8 -*- s = list(input()) if s[-1] == "i" and s[-2] == "a": s[-1] = "I" s[-2] = "A" else: s = s + ["-AI"] s = "".join(s) print(s)