#include #include #include #include #include #include #include #define FOR(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define FORR(i,l,n) for(int (i)=l;(i)<(int)(n);++(i)) int main() { std::string S; std::cin >> S; if (S.find("ai",S.size()-2) != std::string::npos) { std::string temp = "AI"; S.replace(S.size() - 2, 2, temp); } else { S += "-AI"; } std::cout << S << std::endl; return 0; }