#include #include using namespace std; int main() { string s; cin >> s; if (s.size() < 2)cout << s << "-AI" << endl; else if (s.back() == 'i'&&s[s.size() - 1] == 'a')cout << s.substr(0, s.size() - 2) << "AI" << endl; else cout << s << "-AI\n"; }