#include #define FOR(i,bg,ed) for(ll i=(bg);i<(ed);i++) #define REP(i,n) FOR(i,0,n) #define MOD 1000000007 //#define int long long using namespace std; typedef long long ll; const int INF = 1e9; signed main() { string s; cin >> s; if (s[s.length()-2] == 'a' && s[s.length()-1] == 'i') { cout << s.substr(0, s.length()-2) + "AI" << endl; } else { cout << s << "-AI" << endl; } }