#include #define FOR(i,a,b) for(int i = (a); i < (b); ++i) #define REP(i,n) FOR(i,0,n) #define SZ(n) (int)(n).size() #define ALL(n) (n).begin(), (n).end() using namespace std; typedef long long LL; typedef vector VI; int main() { string s; cin >> s; string t; t += s[SZ(s) - 2]; t += s[SZ(s) - 1]; if (t == "ai") s.replace(SZ(s) - 2, SZ(s), "AI"); else s += "-AI"; cout << s << endl; return 0; }