#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;
  scanf("%s", st);
  n = strlen(st);
  while (i <= n / 2) {
    int cnt = 0, pos = -1;
    for (int j = i; j < n; ++j)
      if (st[j] != st[j - i])
        cnt = 0;
      else if (++cnt == i) {
        pos = j + 1;
        break;
      }
    if (cnt == i) {
      for (int j = pos; j < n; ++j) st[j - i] = st[j];
      n -= i;
    } else
      ++i;
  }
  st[n] = 0;
  puts(st);
  return 0;
}
