#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  long long n = (long long)s.size();
  s = ' ' + s;
  for (long long i = 1; i <= n / 2; ++i) {
    long long len = i, cnt = 0;
    for (long long j = i + 1; j <= n; ++j) {
      if (s[j] == s[j - i])
        ++cnt;
      else
        cnt = 0;
      if (cnt == i) {
        len -= cnt;
        cnt = 0;
      }
      s[++len] = s[j];
    }
    n = len;
  }
  for (long long i = 1; i <= n; ++i) cout << s[i];
  return 0;
}
