import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); String ans = ""; String S = in.next(); if (S.charAt(S.length()-2) == 'a' && S.charAt(S.length()-1) == 'i') { System.out.println(S.substring(0, S.length()-2) + "AI"); } else { System.out.println(S + "-AI"); } System.out.println(ans); } }