#include <bits/stdc++.h>
using namespace std;
char str[50050];
int main() {
  cin >> str;
  int n = strlen(str);
  for (int len = 1; len <= n / 2; ++len) {
    int writeto = len - 1;
    int equal = 0;
    for (int i = len; i < n; ++i) {
      if (str[i] == str[i - len]) {
        ++equal;
        if (equal == len) {
          writeto -= len;
          equal = 0;
        }
      } else {
        equal = 0;
      }
      str[++writeto] = str[i];
    }
    str[++writeto] = 0;
    n = writeto;
  }
  cout << str << endl;
  return 0;
}
