#include <bits/stdc++.h>
using namespace std;
char s[50010];
int n;
int main() {
  scanf("%s", s);
  n = strlen(s);
  register int i, j;
  int b, len;
  for (i = 1; i <= n / 2; i++) {
    b = 0;
    len = 0;
    for (j = 0; j + i < n; j++) {
      if (len == i) break;
      if (s[j] == s[j + i])
        len++;
      else {
        b = j + 1;
        len = 0;
      }
    }
    if (len == i) {
      for (j = b; i + j < n; j++) s[j] = s[j + len];
      n -= len;
      i--;
    } else
      len++;
  }
  for (i = 0; i < n; i++) putchar(s[i]);
  putchar('\n');
  return 0;
}
