#include <bits/stdc++.h>
using namespace std;
char buf[50010];
int N;
int rem[50010], ust;
int main() {
  scanf("%s", &buf);
  N = strlen(buf);
  for (int L = 1; L + L <= N; ++L) {
    ++ust;
    int lo = 0, hi = L, len = 0;
    while (hi < N) {
      if (hi + (L - len) > N) break;
      if (buf[lo] == buf[hi])
        ++lo, ++hi, ++len;
      else
        len = 0, ++lo, hi = lo + L;
      if (len == L) {
        for (int i = hi - L; i < hi; ++i) rem[i] = ust;
        lo -= L, len = 0;
      }
    }
    int NN = 0;
    for (int i = 0; i < N; ++i)
      if (rem[i] != ust) buf[NN++] = buf[i];
    buf[N = NN] = 0;
  }
  puts(buf);
  return 0;
}
