#include <bits/stdc++.h>
using namespace std;
const int N = 50007;
char s[N];
int p;
int main() {
  while (~scanf("%s", s + 1)) {
    p = strlen(s + 1);
    for (int len = 1; len <= p / 2; ++len) {
      p = 0;
      int tot = 0;
      for (int i = 1; s[i]; ++i) {
        s[++p] = s[i];
        if (p - len > 0 && s[p] == s[p - len])
          ++tot;
        else
          tot = 0;
        if (tot == len) p -= len, tot = 0;
      }
      s[p + 1] = '\0';
    }
    printf("%s\n", s + 1);
  }
  return 0;
}
