#include <bits/stdc++.h>
using namespace std;
char c[5010];
int n, m;
bool dp[5010];
int main() {
  scanf("%s", c + 1);
  n = strlen(c + 1);
  m = log2(n);
  memset(dp, 1, sizeof(dp));
  for (int i = 1; i <= n - (1 << m) + 1; i++) {
    for (int s = 0; s < (1 << m); s++)
      if (dp[s])
        for (int j = 0; j < m; j++) dp[s | (1 << j)] = 1;
    int t = 200;
    for (int s = 0; s < (1 << m); s++)
      if (dp[s]) t = min(t, (int)c[i + s]);
    for (int s = 0; s < (1 << m); s++) dp[s] &= (c[i + s] == t);
    printf("%c", t);
  }
  return 0;
}
