#include #include using namespace std; int main() { string s; cin >> s; int l = s.length(); if(s[l-2] == 'a' && s[l-1 == 'i']){ s[l-2] = 'A'; s[l-1] = 'I'; cout << s << endl; }else cout << s << "-AI" << endl; return 0; }