#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int arr[26];
  memset(arr, 0, sizeof(arr));
  for (int i = 0; i < s.length(); i++) arr[s[i] - 97]++;
  int index = 0;
  for (int i = 1; i < 26; i++)
    if (arr[i] > 0) index = i;
  for (int i = 0; i < arr[index]; i++) cout << char(index + 97);
}
