#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000000 + 100;
char s[maxn];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> s;
  int n = strlen(s);
  for (int len = 1; len * 2 <= n; ++len) {
    for (int i = 0; i + 2 * len <= n; ++i)
      for (int k = 0; k <= len; ++k)
        if (k == len) {
          copy(&s[i + 2 * len], &s[n], &s[i + len]);
          s[n -= len] = '\0';
          i = i - 1;
          break;
        } else if (s[i + k] != s[i + len + k]) {
          i = i + k;
          break;
        }
  }
  cout << s << '\n';
  return 0;
}
