#include using namespace std; typedef long long ll; typedef pair pii; #define pb push_back #define mp make_pair #define rep(i,n) for(int i=0;i<(n);++i) int main(){ cin.tie(0); ios::sync_with_stdio(false); 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; }