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