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