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