#include <bits/stdc++.h>
using namespace std;
void bug() { cout << " " << endl; }
template <class T>
void bug(T a) {
  cout << a << "  ";
}
template <class T>
void bug(T *a, int n) {
  for (int i = 0; i < (n); i++) bug(a[i]);
}
char buf[2][55555];
int n;
int d[55555];
int main() {
  scanf("%s", buf[0]);
  char *cur = buf[1];
  char *nxt = buf[0];
  n = strlen(nxt);
  for (int i = 0; i < (n / 2 + 1); i++)
    if (i) {
      swap(cur, nxt);
      for (int j = 0; j < (n - i); j++) {
        if (j == 0 || d[j - 1] == 0)
          d[j] = 0;
        else
          d[j] = d[j - 1] - 1;
        int k = d[j];
        while (j + i + k < n && cur[j + k] == cur[j + i + k]) k++;
        d[j] = k;
      }
      int nn = 0;
      for (int j = 0; j < n;) {
        if (d[j] >= i)
          j += i;
        else
          nxt[nn++] = cur[j++];
      }
      n = nn;
      nxt[nn] = '\0';
    }
  printf("%s\n", nxt);
  return 0;
}
