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'){ System.out.println(S.substring(0,N-3)+"AI"); }else{ System.out.println(S+"-AI"); } } }