import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { // Here your code ! BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line = br.readLine(); if(line.endsWith("ai")){ for(int i = 0; i < 2; i++){ line = line.substring(0, line.length()-1); } System.out.println(line + "AI"); }else{ System.out.println(line + "-AI"); } } }