#include "bits/stdc++.h" #define rep(a,b) for(int a = 0;a < b;a++) #define REP(i, x, n) for(int i = x; i < n; i++) using namespace std; typedef long long ll; typedef unsigned long long ull; int dx[] = { 1, -1 , 0 , 0 }; int dy[] = { 0, 0, 1, -1 }; int main() { string s; cin >> s; if (s.substr(s.length()-2, 2) == "ai") { cout << s.substr(0, s.length() - 2) + "AI" << endl; } else { cout << s + "-AI" << endl; } }