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