#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:33554432")
int N;
char A[50004];
int main() {
  int i, len;
  scanf("%s", A);
  N = strlen(A);
  for (len = 1; len <= N / 2; len++) {
    int cnt = 0, p = len;
    for (i = len; i < N; i++) {
      cnt = (A[i] == A[i - len] ? cnt + 1 : 0);
      if (cnt == len) {
        p -= len;
        cnt = 0;
      }
      A[p++] = A[i];
    }
    A[N = p] = 0;
  }
  puts(A);
}
