#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e4 + 50;
int n;
char s[maxn];
int main() {
  scanf("%s", s);
  n = strlen(s);
  for (int i = 1; i <= n / 2; i++) {
    int temp = -1, cnt = 0;
    for (int j = i + 1; j <= n; j++) {
      if (s[j - 1] == s[j - 1 - i])
        cnt++;
      else
        cnt = 0;
      if (cnt == i) {
        temp = j;
        break;
      }
    }
    if (temp != -1) {
      for (int j = temp - 1; j < n; j++) {
        s[j - i] = s[j];
      }
      n = n - i;
      i--;
    }
  }
  for (int i = 0; i < n; i++) putchar(s[i]);
  return 0;
}
