#include <bits/stdc++.h>
using namespace std;
const int inf = ~0U >> 1;
const long long INF = ~0ULL >> 1;
template <class T>
inline void read(T &n) {
  char c;
  for (c = getchar(); !(c >= '0' && c <= '9'); c = getchar())
    ;
  n = c - '0';
  for (c = getchar(); c >= '0' && c <= '9'; c = getchar()) n = n * 10 + c - '0';
}
int Pow(int base, int n, int mo) {
  if (n == 0) return 1;
  if (n == 1) return base % mo;
  int tmp = Pow(base, n >> 1, mo);
  tmp = (long long)tmp * tmp % mo;
  if (n & 1) tmp = (long long)tmp * base % mo;
  return tmp;
}
char s[120000];
int v[60000];
int main() {
  scanf("%s", s + 1);
  int L = strlen(s + 1);
  for (int l = (1); l <= (L >> 1); ++l) {
    int cnt = 0;
    for (int i = (1); i <= (L); ++i) {
      if (i + l > L) break;
      if (s[i] == s[i + l])
        cnt++;
      else
        cnt = 0;
      if (cnt == l) {
        for (int j = (i - l + 1); j <= (i); ++j) v[j] = 1;
        cnt = 0;
        if (i + 2 * l > L) break;
      }
    }
    int tl = 0;
    for (int i = (1); i <= (L); ++i)
      if (!v[i])
        s[++tl] = s[i];
      else
        v[i] = 0;
    L = tl;
  }
  for (int i = (1); i <= (L); ++i) printf("%c", s[i]);
  puts("");
  return 0;
}
