#include <bits/stdc++.h>
using namespace std;
char str[51000];
int n;
char a[51000];
int main() {
  int m = 0;
  scanf("%s", str + 1);
  n = strlen(str + 1);
  for (int i = (1); i <= (n); i++)
    if (str[i] != str[i - 1]) a[++m] = str[i];
  n = m;
  int now = 2;
  while (now <= n / 2) {
    int u = 0;
    bool f = 0;
    int i = 1;
    for (; i <= n - now; i++) {
      if (a[i] == a[i + now]) {
        u++;
      } else
        u = 0;
      if (u == now) {
        f = 1;
        break;
      }
    }
    if (!f)
      now++;
    else {
      for (int j = (i); j <= (n - now); j++) a[j] = a[j + now];
      n -= now;
    }
  }
  for (int i = (1); i <= (n); i++) putchar(a[i]);
  return 0;
}
