#include <bits/stdc++.h>
int main() {
  char s[15];
  char a;
  int len;
  scanf("%s", s);
  len = strlen(s);
  a = 'a' - 1;
  for (int i = 0; i < len; i++) {
    if (a <= s[i]) {
      a = s[i];
    }
  }
  for (int i = 0; i < len; i++) {
    if (s[i] == a) printf("%c", s[i]);
  }
  return 0;
}
