#include <bits/stdc++.h>
using namespace std;
const int N = 50005;
char s[N];
int n;
int main() {
  ios::sync_with_stdio(false);
  cin >> (s + 1);
  n = strlen(s + 1);
  for (int i = 1; i <= n / 2; i++) {
    int cnt = 0;
    for (int j = 1; j <= n - i; j++) {
      if (s[j] == s[j + i])
        ++cnt;
      else
        cnt = 0;
      if (cnt == i) {
        for (int k = j + 1; k <= n - i; k++) s[k] = s[k + i];
        n -= i;
        i = 0;
        break;
      }
    }
  }
  s[n + 1] = 0;
  cout << (s + 1) << endl;
  return 0;
}
