S = str(input()) word1 = S[0:-2] word2 = S[-2] word3 = S[-1] if word2 == 'a' and word3 == 'i': print(word1 + 'AI') else: print(S + '-AI')