import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); int n = s.length(); if(s.substring(n - 2, n).equals("ai")) { s = s.substring(0, n - 2) + "AI"; } else { s += "-AI"; } System.out.println(s); } }