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