import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String S = sc.next(); solve(S); } static void solve(String S){ int N = S.length(); if(S.charAt(N-2)=='a'&&S.charAt(N-1)=='i'){ for(int i=0; i<=N-3; i++){ System.out.print(S.charAt(i)); } System.out.println("AI"); }else{ System.out.println(S+"-AI"); } } }