#include <bits/stdc++.h>
using namespace std;
const int N = 50000 + 5;
int n;
char st[N];
int main(int argc, char **argv) {
  scanf("%s", st + 1);
  n = strlen(st + 1);
  for (int i = 1, j, k, cnt; (i << 1) <= n; ++i, n = k)
    for (j = 1, k = 0, cnt = 0; j <= n; ++j) {
      st[++k] = st[j];
      if (k > i && st[k] == st[k - i])
        ++cnt;
      else
        cnt = 0;
      if (cnt == i) cnt = 0, k -= i;
    }
  st[n + 1] = 0;
  puts(st + 1);
  return 0;
}
