#include <bits/stdc++.h>
const int N = 50005;
char s[N];
int main() {
  scanf("%s", s);
  int i, j, n = strlen(s);
  for (j = 1; j <= n / 2; j++) {
    int t = 0, cnt = 0;
    for (i = 0; i + j < n; i++) {
      s[t++] = s[i];
      if (s[i] == s[i + j])
        cnt++;
      else
        cnt = 0;
      if (cnt == j) {
        t -= j;
        cnt = 0;
      }
    }
    for (; i < n; i++) s[t++] = s[i];
    n = t;
  }
  s[n] = 0;
  puts(s);
  return 0;
}
