#include using namespace std; struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star; int main() { string S; cin >> S; cout << ( S[ S.size() - 1 ] == 'i' && S[ S.size() - 2 ] == 'a' ? S.substr(0,S.size() - 2) + "AI" : S + "-AI" ) << endl; return 0; }