#include #include #include #include #include #include #define MP make_pair using ll = long long; using namespace std; int main() { string S; cin >> S; if(S[S.size()-2] == 'a' && S[S.size()-1] == 'i'){ S[S.size()-2] = 'A'; S[S.size()-1] = 'I'; cout << S << endl; }else{ cout << S << "-AI" << endl; } return 0; }