#include <bits/stdc++.h>
using namespace std;
const int N = 50005;
char s[N];
int main() {
  scanf("%s", s + 1);
  int n = strlen(s + 1);
  for (int i = 1; i <= n; i++) {
    int cnt = 0;
    for (int j = 1; j <= n - i; j++)
      if (s[j] == s[j + i]) {
        cnt++;
        if (cnt == i) {
          for (int k = j + 1; k <= n - i; k++) s[k] = s[k + i];
          n -= i;
          i--;
          break;
        }
      } else
        cnt = 0;
  }
  s[n + 1] = 0;
  puts(s + 1);
}
