#include <bits/stdc++.h>
using namespace std;
char arr[50010];
int main() {
  scanf("%s", arr);
  int n = strlen(arr);
  while (true) {
    int _p = -1, len = 0;
    for (int i = 1; i <= n / 2; ++i) {
      int idx = 0;
      for (int j = 0; j + (i << 1) <= n; ++j) {
        while (arr[j + idx] == arr[j + idx + i]) idx++;
        if (idx == i) {
          _p = j;
          len = i;
          break;
        }
        idx = max(idx - 1, 0);
      }
      if (_p != -1) break;
    }
    if (_p == -1) break;
    memcpy(arr + _p + len, arr + _p + 2 * len, n - (_p + 2 * len) + 1);
    n -= len;
  }
  puts(arr);
}
