#include <bits/stdc++.h>
using namespace std;
char s[2][60000];
int d[60000];
int main() {
  int i, j, k, cnt, nn, now, n;
  scanf("%s", s[0]);
  n = strlen(s[0]);
  now = 0;
  for (i = 1; i <= n / 2; i++) {
    nn = 0;
    for (j = 0; j < n; j++) {
      s[1 - now][nn] = s[now][j];
      if ((nn - i >= 0) && (s[1 - now][nn] == s[1 - now][nn - i]))
        d[nn] = d[nn - 1] + 1;
      else
        d[nn] = 0;
      if (d[nn] == i) {
        nn -= i;
        nn++;
      } else
        nn++;
    }
    s[1 - now][nn] = 0;
    n = nn;
    now = 1 - now;
  }
  printf("%s\n", s[now]);
}
