#include using namespace std; int main() { cin.tie(0)->sync_with_stdio(0); string S; cin >> S; if (S.substr(ssize(S) - 2, 2) == "ai") { cout << S.substr(0, ssize(S) - 2) << "AI" << endl; } else { cout << S << "-AI" << endl; } }