#include <bits/stdc++.h>
using namespace std;
const long long INF = 1 << 28;
const long long LINF = 1ll << 61;
const unsigned long long base = 1000000007;
char s[50011];
unsigned long long hs[50011], pw[50011];
int n;
unsigned long long geths(int x, int y) {
  return hs[y - 1] - hs[x - 1] * pw[y - x];
}
void calchs() {
  hs[0] = 0;
  for (int i = 1; i <= n; i++) hs[i] = hs[i - 1] * base + s[i];
}
int getlcp(int x, int y) {
  int l = 0, r = n + 1 - max(x, y);
  while (l <= r) {
    int m = l + r >> 1;
    if (geths(x, x + m) == geths(y, y + m))
      l = m + 1;
    else
      r = m - 1;
  }
  return r;
}
int getlcprev(int x, int y) {
  int l = 0, r = min(x, y) - 1;
  while (l <= r) {
    int m = l + r >> 1;
    if (geths(x - m, x) == geths(y - m, y))
      l = m + 1;
    else
      r = m - 1;
  }
  return r;
}
bool ok[50011];
bool vis[50011];
void remove(int st, int len, int x) {
  for (int i = st; i + x - 1 < st + len; i += x) {
    for (int j = 0; j < x; j++) {
      ok[i + j + x] = 1;
    }
  }
}
void update() {
  int nn = 0;
  for (int i = 1; i <= n; i++) {
    if (!ok[i]) {
      nn++;
      s[nn] = s[i];
    }
  }
  n = nn;
  calchs();
}
int main() {
  pw[0] = 1;
  for (int i = 1; i <= 50005; i++) pw[i] = pw[i - 1] * base;
  scanf("%s", s + 1);
  n = strlen(s + 1);
  calchs();
  for (int i = 1; i <= n; i++) {
    bool flag = 0;
    for (int j = 1; j + i <= n; j += i) {
      int pre = getlcprev(j, j + i), nxt = getlcp(j, j + i);
      if (pre + nxt >= i) {
        flag = 1;
        if (vis[j - pre]) continue;
        vis[j - pre] = 1;
        remove(j - pre, pre + nxt, i);
      }
    }
    if (flag) {
      update();
      for (int j = 1; j <= n; j++) vis[j] = ok[j] = 0;
    }
  }
  for (int i = 1; i <= n; i++) putchar(s[i]);
  return 0;
}
