#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3fffffff;
const int SINF = 0x7fffffff;
const long long LINF = 0x3fffffffffffffff;
const long long SLINF = 0x7fffffffffffffff;
const int MAXN = 50007;
int n;
char s[MAXN];
int nxt[MAXN], pre[MAXN];
void init();
void input();
void work();
int main() {
  init();
  input();
  work();
}
void init() { ios::sync_with_stdio(false); }
void input() { scanf("%s", s + 1); }
void work() {
  n = strlen(s + 1);
  for (int i = 0; i <= n + 1; ++i) nxt[i] = i + 1, pre[i] = i - 1;
  int np;
  for (int l = 1; l <= n >> 1; ++l) {
    int j = nxt[0], k = j;
    for (int i = 0; i < l; ++i) {
      k = nxt[k];
      if (k > n) break;
    }
    if (k > n) break;
    for (int nl = 0; k <= n; j = nxt[j], k = nxt[k]) {
      if (s[j] == s[k]) {
        ++nl;
        if (nl == l) {
          np = j;
          for (int a = 1; a < l; ++a) np = pre[np];
          nxt[pre[np]] = nxt[j], pre[nxt[j]] = pre[np];
          nl = 0;
        }
      } else
        nl = 0;
    }
  }
  for (int i = nxt[0]; i <= n; i = nxt[i]) putchar(s[i]);
  putchar('\n');
}
