s=input() print(s + ("AI" if s. endswith("ai") else "-AI"))