import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); char[] arr = sc.next().toCharArray(); int length = arr.length; if (arr[length - 2] == 'a' && arr[length - 1] == 'i') { arr[length - 2] = 'A'; arr[length - 1] = 'I'; System.out.println(arr); } else { System.out.println(new String(arr) + "-AI"); } } }