#include <bits/stdc++.h>
using namespace std;
const int MAXN = 51111;
char s[MAXN];
bool rep[MAXN];
int main() {
  scanf("%s", s);
  for (int len = 1; len <= strlen(s) / 2; ++len) {
    int n = strlen(s);
    for (int i = 0; i < n; ++i) rep[i] = false;
    for (int i = len; i + len <= n; i += len) {
      int l = 0, r = 0;
      while (i - l > 0 && s[i - l - 1] == s[i + len - l - 1] && l < len) ++l;
      while (i + len + r < n && s[i + r] == s[i + len + r] && l + r < len) ++r;
      if (l + r >= len) {
        for (int j = i - l + len; j < i - l + len + len; ++j) rep[j] = true;
        i += len - l;
      }
    }
    int tot = 0;
    for (int i = 0; i < n; ++i)
      if (rep[i]) {
      } else {
        s[tot++] = s[i];
      }
    s[tot] = 0;
  }
  puts(s);
  return 0;
}
