#include <bits/stdc++.h>
using namespace std;
const int N = 1e6;
char ss[N];
int main() {
  while (scanf("%s", ss) != EOF) {
    int n = strlen(ss);
    int len = 1;
    while (len <= n / 2) {
      int l = len, r = len;
      int cnt = 0;
      while (r < n) {
        if (ss[r] == ss[r - len]) {
          cnt++;
        } else {
          cnt = 0;
        }
        ss[l] = ss[r];
        l++;
        r++;
        if (cnt == len) {
          l -= len;
          cnt = 0;
        }
      }
      len++;
      n = l;
      ss[n] = '\0';
    }
    ss[n] = '\0';
    printf("%s\n", ss);
  }
  return 0;
}
