#include <bits/stdc++.h>
using namespace std;
const int seed = 27;
int n, m;
long long h[50010], pw[50010];
char a[50010], b[50010];
long long calc(int l, int r) { return h[r] - h[l - 1] * pw[r - l + 1]; }
int calc_lcp(int i, int j) {
  int l, r, mid, ret = 0;
  long long s1, s2;
  l = 0;
  r = min(n - i + 1, n - j + 1);
  while (l <= r) {
    mid = (l + r) / 2;
    s1 = calc(i, i + mid - 1);
    s2 = calc(j, j + mid - 1);
    if (s1 == s2) {
      ret = max(ret, mid);
      l = mid + 1;
    } else
      r = mid - 1;
  }
  return ret;
}
int calc_lcs(int i, int j) {
  int l, r, mid, ret = 0;
  long long s1, s2;
  l = 0;
  r = min(i, j);
  while (l <= r) {
    mid = (l + r) / 2;
    s1 = calc(i - mid + 1, i);
    s2 = calc(j - mid + 1, j);
    if (s1 == s2) {
      ret = max(ret, mid);
      l = mid + 1;
    } else
      r = mid - 1;
  }
  return ret;
}
int check(int l) {
  int i, j, last = 0, s1, s2;
  for (i = 1; i <= n; i += l / 2) {
    if (last) {
      s1 = calc_lcp(last, i);
      s2 = calc_lcs(last, i);
      if (s1 + s2 - 1 >= l / 2) return 1;
    }
    last = i;
  }
  return 0;
}
int main() {
  int i, j, p, s;
  long long s1, s2;
  scanf("%s", a + 1);
  n = strlen(a + 1);
  pw[0] = 1;
  for (i = 1; i <= n; i++) pw[i] = pw[i - 1] * seed;
  for (i = 1; i <= n; i++) h[i] = h[i - 1] * seed + a[i] - 96;
  for (p = 2; p <= n; p += 2)
    if (check(p)) {
      s = 0;
      m = 0;
      for (i = 1; i <= p / 2; i++) b[++m] = a[i];
      for (i = p / 2 + 1; i <= n; i++) {
        b[++m] = a[i];
        if (b[m] == b[m - p / 2]) {
          s++;
          if (s == p / 2) {
            m -= p / 2;
            s = 0;
          }
        } else
          s = 0;
      }
      n = m;
      for (i = 1; i <= n; i++) a[i] = b[i];
      for (i = 1; i <= n; i++) h[i] = h[i - 1] * seed + (a[i] - 96);
    }
  for (i = 1; i <= n; i++) printf("%c", a[i]);
  return 0;
}
