import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No00000536_Main { static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); public static void main(String[] args) throws IOException { String s = br.readLine(); if("ai".equals(s.substring(s.length()-2))) { System.out.println(s.substring(0, s.length()-2) + "AI"); } else { System.out.println(s + "-AI"); } } }