#include #define int long long using namespace std; signed main() { string S; cin >> S; int N = (int)S.size(); if( S.at(N-2) == 'a' && S.at(N-1) == 'i' ) cout << S.substr(0, N-2) << "AI" << endl; else cout << S << "-AI" << endl; }