#include #include using namespace std; string s; int main() { cin >> s; if (s[s.length() - 2] == 'a' && s[s.length() - 1] == 'i') { for (int i = 0; i < s.length() - 2; i++) cout << s[i]; cout << "AI" << endl; } else { cout << s << "-AI" << endl; } return 0; }