#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, cnt; (i << 1) <= n; ++i)
    for (j = i + 1, cnt = 0; j <= n; ++j)
      if (st[j] == st[j - i]) {
        if (++cnt == i) {
          for (int k = j + 1; k <= n; ++k) st[k - i] = st[k];
          n -= i;
          j -= i;
          cnt = 0;
        }
      } else
        cnt = 0;
  st[n + 1] = 0;
  puts(st + 1);
  return 0;
}
