#include <bits/stdc++.h>
using namespace std;
const long long linf = 1e18 + 5;
const int mod = (int)1e9 + 7;
const int logN = 17;
const int inf = 1e9;
const int N = 50001;
int i, j, s, tt, k, ans[N], temp[N], n, l;
char str[N];
int main() {
  scanf("%s", str + 1);
  n = strlen(str + 1);
  for (i = 1; i <= n; i++) ans[i] = i;
  s = n;
  for (l = 1; l <= s / 2; l++) {
    int ok = 0, ss = 0;
    for (i = 1; i <= l; i++) temp[++ss] = ans[i];
    for (i = l + 1; i <= s; i++) {
      if (str[ans[i]] == str[ans[i - l]])
        ok++;
      else
        ok = 0;
      temp[++ss] = ans[i];
      if (ok == l) {
        ss -= l;
        ok = 0;
      }
    }
    for (i = 1; i <= ss; i++) ans[i] = temp[i];
    s = ss;
  }
  for (int i = 1; i <= s; i++) printf("%c", str[ans[i]]);
  cout << '\n';
  return 0;
}
