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