#include <bits/stdc++.h>
using namespace std;
const int N = 55555;
char s[N];
int main() {
  while (cin >> s) {
    int len = strlen(s);
    for (int l = 1; l <= (len >> 1); l++) {
      int t = l, c = 0;
      for (int i = 0, j = l; j < len; i++, j++) {
        s[i] == s[j] ? c++ : c = 0;
        if (c == l) t -= l, c = 0;
        s[t++] = s[j];
      }
      s[t] = 0;
      len = t;
    }
    cout << s << endl;
  }
  return 0;
}
