#include using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); string s; cin >> s; int n = s.length(); if(s[n-2]=='a' && s[n-1]=='i') { s[n-2] = 'A'; s[n-1] = 'I'; } else { s += "-AI"; } cout << s << '\n'; return 0; }