# -*- coding: utf-8 -*- S = input() r_S = S[::-1] if r_S[0] == 'i' and r_S[1] == 'a': temp = S[:-2] print(temp+'AI') else: print(S+'-AI')