package me.yukicoder; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No0536 { public static void main(String[] args) { try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) { String input = br.readLine(); String ans = judgeLastletter(input) ? input.substring(0, input.lastIndexOf("ai")) + "Ai" : input + "-AI"; System.out.println(ans); } catch (IOException e) { e.printStackTrace(); } } static boolean judgeLastletter(String input) { return input.charAt(input.length() - 2) == 'a' && input.charAt(input.length() - 1) == 'i'; } }