#include <bits/stdc++.h>
using namespace std;
int32_t main(void) {
  long long c;
  long long a[27]{0};
  while ((c = getchar()) != '\n') {
    a[c - 'a']++;
  }
  for (long long i = 26; i >= 0; i--) {
    if (a[i] != 0) {
      for (long long j = 0; j < a[i]; j++) {
        putchar(i + 'a');
      }
      return 0;
    }
  }
}
