s=raw_input() if s[-2]+s[-1]=='ai': print s[0:-2] + 'AI' else: print s+'-AI'