S = input() if "ai" in S[len(S)-1:len(S)] : A = S[0:len(S)-2] print("{}AI".format(A)) else : print("{}-AI".format(S))