#include <bits/stdc++.h>
using namespace std;
template <typename... T>
void debug(T... args) {
  ((cerr << args << " "), ...);
}
template <typename... T>
void read(T&... args) {
  ((cin >> args), ...);
}
template <typename... T>
void write(T... args) {
  ((cout << args << " "), ...);
}
void solve() {
  string s;
  read(s);
  sort(s.begin(), s.end());
  auto itr = lower_bound(s.begin(), s.end(), s[s.length() - 1]);
  for (; itr != s.end(); itr++) cout << *itr;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
