#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline void smin(T &a, const U &b) {
  if (a > b) a = b;
}
template <typename T, typename U>
inline void smax(T &a, const U &b) {
  if (a < b) a = b;
}
template <class T>
inline void gn(T &first) {
  char c, sg = 0;
  while (c = getchar(), (c > '9' || c < '0') && c != '-')
    ;
  for ((c == '-' ? sg = 1, c = getchar() : 0), first = 0; c >= '0' && c <= '9';
       c = getchar())
    first = (first << 1) + (first << 3) + c - '0';
  if (sg) first = -first;
}
template <class T1, class T2>
inline void gn(T1 &x1, T2 &x2) {
  gn(x1), gn(x2);
}
int power(int a, int b, int m, int ans = 1) {
  for (; b; b >>= 1, a = 1LL * a * a % m)
    if (b & 1) ans = 1LL * ans * a % m;
  return ans;
}
const int B = 29;
char s[50050];
int n;
long long H[50050], pp[50050];
void pre() {
  n = strlen(s + 1);
  for (int i = 1; i <= n; i++) H[i] = H[i - 1] * B + s[i] - 'a' + 1;
}
long long calc(int st, int ed) {
  if (st > ed) return 0;
  return H[ed] - H[st - 1] * pp[ed - st + 1];
}
int lcp(int i, int j) {
  int st = 0, ed = n - j + 2;
  while (ed - st > 1) {
    int mid = st + ed >> 1;
    if (calc(i, i + mid - 1) == calc(j, j + mid - 1))
      st = mid;
    else
      ed = mid;
  }
  return st;
}
int lcs(int i, int j) {
  int st = 0, ed = i + 1;
  while (ed - st > 1) {
    int mid = st + ed >> 1;
    if (calc(i - mid + 1, i) == calc(j - mid + 1, j))
      st = mid;
    else
      ed = mid;
  }
  return st;
}
bool can(int len) {
  for (int i = 1; i + len <= n; i += len) {
    if (lcp(i, i + len) + lcs(i, i + len) >= len) return true;
  }
  return false;
}
int cnt[50050];
void solve(int len) {
  for (int i = 1; i <= n; i++) cnt[i] = 0;
  for (int i = len + 1; i + len - 1 <= n; i++) {
    if (calc(i - len, i - 1) == calc(i, i + len - 1)) {
      cnt[i - len]++;
      cnt[i]--;
      i += len - 1;
    }
  }
  for (int i = 1; i <= n; i++) cnt[i] += cnt[i - 1];
  int nn = 0;
  for (int i = 1; i <= n; i++)
    if (!cnt[i]) s[++nn] = s[i];
  s[(n = nn) + 1] = 0;
}
int main() {
  for (int i = pp[0] = 1; i < 50050; i++) pp[i] = pp[i - 1] * B;
  scanf("%s", s + 1);
  pre();
  for (int len = 1; len * 2 <= n; len++) {
    if (can(len)) {
      solve(len);
      pre();
    }
  }
  puts(s + 1);
  return 0;
}
