#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void read(T& x) {
  int f;
  char c;
  for (f = 1, c = getchar(); c < '0' || c > '9'; c = getchar())
    if (c == '-') f = -f;
  for (x = 0; c <= '9' && c >= '0'; c = getchar()) x = x * 10 + (c & 15);
  x *= f;
}
template <typename T>
inline void write(T x) {
  static char q[64];
  int cnt = 0;
  if (!x) putchar('0');
  if (x < 0) putchar('-'), x = -x;
  while (x) q[cnt++] = x % 10 + '0', x /= 10;
  while (cnt--) putchar(q[cnt]);
}
const int maxn = 50005;
const int Base = 29, mod = 1000000007;
int mo(const int x) { return x >= mod ? x - mod : x; }
char s[maxn];
int h[maxn], _Base[maxn];
int Get(int l, int r) {
  return mo(mod - 1ll * h[l - 1] * _Base[r - l + 1] % mod + h[r]);
}
int n;
int LCS(int x, int y) {
  int l = 0, r = min(x, y);
  while (l < r) {
    int mid = (l + r + 1) >> 1;
    if (Get(x - mid + 1, x) == Get(y - mid + 1, y))
      l = mid;
    else
      r = mid - 1;
  }
  return l;
}
int LCP(int x, int y) {
  int l = 0, r = n - max(x, y) + 1;
  while (l < r) {
    int mid = (l + r + 1) >> 1;
    if (Get(x, x + mid - 1) == Get(y, y + mid - 1))
      l = mid;
    else
      r = mid - 1;
  }
  return l;
}
int vis[maxn];
int main() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  _Base[0] = 1;
  for (int i = 1; i <= n; ++i) _Base[i] = 1ll * _Base[i - 1] * Base % mod;
  for (int i = 1; i <= n; ++i)
    h[i] = mo(1ll * h[i - 1] * Base % mod + (s[i] - 'a' + 1));
  for (int dis = 1; dis <= n; ++dis) {
    int ok = false, pos = 0;
    for (int j = dis, k = j + dis; k <= n; j += dis, k += dis) {
      int lcs = LCS(j, k), lcp = LCP(j, k);
      lcs = min(lcs, j - pos + 1);
      if (lcs + lcp > dis) {
        ok = true;
        ++vis[j - lcs + 1];
        --vis[j - lcs + dis + 1];
        pos = j - lcs + dis + 1;
      }
    }
    if (ok) {
      for (int i = 1; i <= n; ++i) vis[i] += vis[i - 1];
      int m = 0;
      for (int i = 1; i <= n; ++i) {
        if (!vis[i]) {
          s[++m] = s[i];
          h[m] = mo(1ll * h[m - 1] * Base % mod + (s[m] - 'a' + 1));
        }
        vis[i] = 0;
      }
      n = m;
      s[m + 1] = '\0';
    }
  }
  printf("%s\n", s + 1);
  return 0;
}
