#include #include #include using namespace std; int main() { for (string s; cin >> s;) { char c_max = *max_element(s.begin(), s.end()); for (char c : s) { cout << c; if (c == c_max) { cout << "(max)"; } } cout << endl; } return 0; }