#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, freq[125] = {0}, m, l;
  char s[10], x[10];
  cin >> s;
  for (l = 0; s[l] != '\0'; l++)
    ;
  for (i = 0; i < l; i++) {
    ++freq[s[i]];
  }
  for (i = 122; i >= 97; i--) {
    if (freq[i] != 0) {
      m = i;
      break;
    }
  }
  i = 0;
  do {
    x[i] = m;
    --freq[m];
    i++;
  } while (freq[m] != 0);
  x[i] = '\0';
  cout << x;
  return 0;
}
