#include using namespace std; #define FOR(i,l,r) for(int i = (int) (l);i < (int) (r);i++) template bool chmax(T& a,const T& b){ return a < b ? (a = b,true) : false; } template bool chmin(T& a,const T& b){ return b < a ? (a = b,true) : false; } typedef long long ll; int N; string S; int main() { cin >> S; N = S.size(); if(S [N - 2] == 'a' && S [N - 1] == 'i'){ S [N - 2] = 'A'; S [N - 1] = 'I'; } else{ S += "-AI"; } cout << S << endl; return 0; }