#include "bits/stdc++.h" using namespace std; int main() { string S; cin >> S; if (S.substr(S.size() - 2, 2) == "ai") cout << S.substr(0, S.size() - 2) << "AI" << endl; else cout << S << "-AI" << endl; }