#include <bits/stdc++.h>
using namespace std;
char str[50010] = "\0";
int N;
int main() {
  scanf("%s", str + 1);
  N = strlen(str + 1);
  for (int l = 1; l <= (N >> 1); l++) {
    int cnt = l;
    int last = l;
    for (int j = l + 1; j <= N; j++) {
      str[++last] = str[j];
      if (str[last] != str[last - l]) cnt = last;
      if (last - cnt == l) last = cnt;
    }
    N = last;
  }
  for (int i = 1; i <= N; i++) putchar(str[i]);
  return 0;
}
