#include <bits/stdc++.h>
using namespace std;
char s[2][100000];
int main() {
  int u, v, l, i, len, n, cnt;
  scanf("%s", s[0]);
  len = strlen(s[0]);
  u = 0;
  v = 1;
  for (l = 1; l * 2 <= len; l++) {
    n = cnt = 0;
    for (i = 0; i + l < len; i++) {
      if (s[u][i] == s[u][i + l])
        cnt++;
      else
        cnt = 0;
      s[v][n++] = s[u][i];
      if (cnt == l) {
        n -= l;
        cnt = 0;
      }
    }
    for (; i < len; i++) s[v][n++] = s[u][i];
    swap(u, v);
    len = n;
  }
  s[u][len] = 0;
  puts(s[u]);
  return 0;
}
