s=input() if s[-1]=='i' and s[-2]=='a': s.pop() s.pop() s+="AI" print(s) else: print(s+'-AI')