#include <bits/stdc++.h>
using namespace std;
char s[50001];
int main() {
  while (~scanf("%s", s)) {
    int n = strlen(s);
    int i, x, y;
    while (1) {
      bool ok = 0;
      for (int r = 1; r + r <= n; r++) {
        int p = 0;
        for (i = 0; i + r + r <= n; i++) {
          while (p < r && s[i + p] == s[i + p + r]) p++;
          if (p == r) {
            x = i, y = r;
            ok = 1;
            break;
          }
          if (p) p--;
        }
        if (ok) break;
      }
      if (!ok) break;
      for (i = x + y; i + y < n; i++) s[i] = s[i + y];
      n -= y;
    }
    s[n] = '\0';
    printf("%s\n", s);
  }
  return 0;
}
