import re s = input() pattern = re.compile(r"ai$") print(re.sub(pattern, "AI", s) if pattern.search(s) else s + "-AI")