S = raw_input() if S[-2] == 'a' and S[-1] == 'i': ans = '' for i in range(0, len(S)-2): ans = ans + S[i] print ans + 'AI' else: print S + '-AI'