#include <bits/stdc++.h>
using namespace std;
char s[50004];
int main() {
  scanf("%s", s);
  int n = strlen(s);
  for (int l = 1; 2 * l <= n; l++) {
    int numEqual = 0;
    vector<int> pos;
    for (int i = 0; i + l < n; i++) {
      if (s[i] == s[i + l])
        numEqual++;
      else
        numEqual = 0;
      if (numEqual == l) numEqual = 0, pos.push_back(i + 1);
    }
    if (pos.size() > 0) {
      int i = 0, j = 0, k = 0;
      while (j < n) {
        while (k < pos.size() && j == pos[k]) j += l, k++;
        if (j == n) break;
        s[i] = s[j];
        i++, j++;
      }
      n = i, s[n] = 0;
    }
  }
  printf("%s\n", s);
}
