#include using namespace std; using ll = long long; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b> s; ll L = s.size(); if(s[L-2]=='a' && s[L-1]=='i'){ cout << s.substr(0, L-2) << "AI" << endl; }else{ cout << s << "-AI" << endl; } return 0; }