#include <bits/stdc++.h>   using namespace std;   int main() {     ios::sync_with_stdio(0), cin.tie(0);     string s;     cin >> s;     sort(s.begin(), s.end());     reverse(s.begin(), s.end());     cout << s[0];     for (long long int(i) = (1); (i) < (s.length()); (i)++) {       if (s[i] == s[i - 1])         cout << s[i];       else         break;     }     cout <<   n ;   }   