#include <bits/stdc++.h>
const int MAX = 109;
const int mod = 1e9 + 7;
using namespace std;
bool prime[MAX];
vector<unsigned long long> seive() {
  for (int i = 2; i < MAX; i++) prime[i] = false;
  int k = 0;
  vector<unsigned long long> p;
  for (int i = 2; i * i < MAX; i++) {
    if (!prime[i]) {
      for (int j = 2 * i; j < MAX; j += i) prime[j] = true;
    }
  }
  for (int i = 2; i < MAX; i++) {
    if (!prime[i]) p.push_back(i);
  }
  return p;
}
int main() {
  string s;
  cin >> s;
  int alp[27];
  memset(alp, 0, sizeof(alp));
  for (int i = 0; i < s.size(); i++) {
    alp[s[i] - 'a']++;
  }
  int a;
  for (int i = 0; i < 26; i++) {
    if (alp[i] >= 1) a = i;
  }
  for (int i = 0; i < alp[a]; i++) cout << char('a' + a);
}
