import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String S = scan.next(); scan.close(); int l = S.length(); if(S.substring(l - 2 ,l).equals("ai")) { String ans = S.substring(0, l - 2); ans += "AI"; System.out.println(ans); }else { String ans = S + "-AI"; System.out.println(ans); } } }