#include <bits/stdc++.h>
using namespace std;
void readi(int &x) {
  int v = 0, f = 1;
  char c = getchar();
  while (!isdigit(c) && c != '-') c = getchar();
  if (c == '-')
    f = -1;
  else
    v = v * 10 + c - '0';
  while (isdigit(c = getchar())) v = v * 10 + c - '0';
  x = v * f;
}
void readll(long long &x) {
  long long v = 0ll, f = 1ll;
  char c = getchar();
  while (!isdigit(c) && c != '-') c = getchar();
  if (c == '-')
    f = -1;
  else
    v = v * 10 + c - '0';
  while (isdigit(c = getchar())) v = v * 10 + c - '0';
  x = v * f;
}
void readc(char &x) {
  char c;
  while ((c = getchar()) == ' ')
    ;
  x = c;
}
void writes(string s) { puts(s.c_str()); }
void writeln() { writes(""); }
void writei(int x) {
  if (!x) putchar('0');
  char a[25];
  int top = 0;
  while (x) {
    a[++top] = (x % 10) + '0';
    x /= 10;
  }
  while (top) {
    putchar(a[top]);
    top--;
  }
}
void writell(long long x) {
  if (!x) putchar('0');
  char a[25];
  int top = 0;
  while (x) {
    a[++top] = (x % 10) + '0';
    x /= 10;
  }
  while (top) {
    putchar(a[top]);
    top--;
  }
}
inline long long inc(int &x) { return ++x; }
inline long long inc(long long &x) { return ++x; }
inline long long inc(int &x, long long y) { return x += y; }
inline long long inc(long long &x, long long y) { return x += y; }
inline double inc(double &x, double y) { return x += y; }
inline long long dec(int &x) { return --x; }
inline long long dec(long long &x) { return --x; }
inline long long dec(int &x, long long y) { return x -= y; }
inline long long dec(long long &x, long long y) { return x -= y; }
inline double dec(double &x, double y) { return x -= y; }
inline long long mul(int &x) { return x = ((long long)x) * x; }
inline long long mul(long long &x) { return x = x * x; }
inline long long mul(int &x, long long y) { return x *= y; }
inline long long mul(long long &x, long long y) { return x *= y; }
inline double mul(double &x, double y) { return x *= y; }
inline long long divi(int &x) {
  long long ans, l, r, mid;
  ans = 0;
  l = 0;
  r = 0x3fffffff;
  while (l < r) {
    mid = (l + r) / 2;
    if (mid * mid < x) {
      ans = mid;
      l = mid + 1;
    } else
      r = mid;
  }
  return ans;
}
inline long long divi(long long &x) {
  long long ans, l, r, mid;
  ans = 0;
  l = 0;
  r = 0x3fffffff;
  while (l < r) {
    mid = (l + r) / 2;
    if (mid * mid < x) {
      ans = mid;
      l = mid + 1;
    } else
      r = mid;
  }
  return ans;
}
inline long long divi(int &x, long long y) { return x /= y; }
inline long long divi(long long &x, long long y) { return x /= y; }
inline double divi(double &x, double y) { return x /= y; }
inline long long mod(int &x, long long y) { return x %= y; }
inline long long mod(long long &x, long long y) { return x %= y; }
int i, j, k, vis[55555];
unsigned long long p[55555], e = 998244353ull * 100000007ull, h[55555];
string s, t;
unsigned long long gth(int l, int r) { return h[r] - h[l - 1] * p[r - l + 1]; }
int lcp(int x, int y) {
  int ans = 0, i;
  for (i = 20; i >= 0; i--) {
    ans += (1 << i);
    if (ans + x - 1 >= s.size() || ans + y - 1 >= s.size()) {
      ans -= (1 << i);
      continue;
    }
    if (gth(x, x + ans - 1) != gth(y, y + ans - 1)) ans -= (1 << i);
  }
  return ans;
}
int lcf(int x, int y) {
  int ans = 0, i;
  for (i = 20; i >= 0; i--) {
    ans += (1 << i);
    if (x - ans + 1 < 1 || y - ans + 1 < 1) {
      ans -= (1 << i);
      continue;
    }
    if (gth(x - ans + 1, x) != gth(y - ans + 1, y)) ans -= (1 << i);
  }
  return ans;
}
bool check(int x) {
  int i;
  for (i = x; i + x - 1 < s.size(); i += x) {
    if (lcp(i, i + x) + lcf(i, i + x) > x) return 1;
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  ;
  cin >> s;
  p[0] = 1;
  s = " " + s;
  for (i = 1; i <= 50000; i++) p[i] = p[i - 1] * e;
  for (i = 1; i < s.size(); i++) h[i] = h[i - 1] * e + s[i];
  for (i = 1; i * 2 < s.size(); i++) {
    if (!check(i)) continue;
    t = " ";
    for (j = 1; j + i * 2 - 1 < s.size(); j++) {
      if (vis[j] != i && gth(j, j + i - 1) == gth(j + i, j + i * 2 - 1)) {
        for (k = j; k < i + j; k++) vis[k] = i;
      }
    }
    for (j = 1; j < s.size(); j++)
      if (vis[j] != i) t.push_back(s[j]);
    s = t;
    for (j = 1; j < s.size(); j++) h[j] = h[j - 1] * e + s[j];
  }
  cout << s.substr(1) << endl;
  return 0;
}
