class C{ public static void main(String[]$){ String s=new java.util.Scanner(System.in).next(); System.out.println((s.endsWith("ai")?s.substring(0,s.length()-2):s+"-")+"AI"); } }