#include <bits/stdc++.h>
using namespace std;
const int MAX = 100000 + 10;
const int Mod = (int)1e9 + 7;
const int Mult = 142341;
int n;
char str[MAX];
long long sum[MAX];
long long P[MAX];
void init() {
  int i;
  for ((i) = (1); (i) <= (n); ++(i))
    sum[i] = (sum[i - 1] * Mult + str[i]) % Mod;
}
long long getHash(int l, int r) {
  long long a = (sum[r] - sum[l - 1] * P[r - l + 1] % Mod + Mod) % Mod;
  return a;
}
int lcs(int a, int b) {
  if (a <= 0 || b <= 0 || a > n || b > n) return -Mod;
  if (str[a] != str[b]) return 0;
  int left = 1, right = min(n - b, n - a) + 1;
  while (left < right) {
    int mid = (left + right + 1) / 2;
    if (getHash(a, a + mid - 1) == getHash(b, b + mid - 1))
      left = mid;
    else
      right = mid - 1;
  }
  return left;
}
int check(int Len) {
  int i;
  for (i = Len + 1; i <= n; i += Len) {
    int l = lcs(i, i - Len);
    if (l >= Len) return 1;
    if (!l) continue;
    int need = Len - l;
    int can = lcs(i - need, i - Len - need);
    if (can >= need) return 1;
  }
  return 0;
}
int fa[MAX];
char nstr[MAX];
void doit(int Len) {
  int now;
  int top = 0;
  int j;
  for (now = 1; now <= n;) {
    int next = now + Len;
    if (next + Len - 1 > n ||
        getHash(next, next + Len - 1) != getHash(now, now + Len - 1)) {
      nstr[++top] = str[now];
      ++now;
      continue;
    }
    while (next + Len - 1 <= n &&
           getHash(next, next + Len - 1) == getHash(now, now + Len - 1))
      next += Len;
    nstr[++top] = str[now];
    now = next - Len + 1;
  }
  n = top;
  for ((j) = (1); (j) <= (n); ++(j)) str[j] = nstr[j];
}
int main() {
  int i;
  scanf("%s", str + 1);
  n = strlen(str + 1);
  P[0] = 1;
  for ((i) = (1); (i) <= (n); ++(i)) P[i] = P[i - 1] * Mult % Mod;
  init();
  for ((i) = (1); (i) <= (n); ++(i))
    if (check(i)) {
      doit(i);
      init();
    }
  for ((i) = (1); (i) <= (n); ++(i)) cout << str[i];
  cout << endl;
  return 0;
}
