#include <bits/stdc++.h>
using namespace std;
const int inf = int(1e9);
const double eps = 1e-9;
const double pi = 4 * atan(double(1));
const int N = 50 * 1000;
char s[N + 10];
int main() {
  gets(s);
  int n = strlen(s), len = 1;
  while (2 * len <= n) {
    int pos = -1, res = 0;
    for (int i = 0; i + 2 * len - 1 < n; i++) {
      while (i + res < i + len && s[i + res] == s[i + len + res]) {
        res++;
      }
      if (res == len) {
        pos = i;
        break;
      }
      res = max(res - 1, 0);
    }
    if (pos == -1) {
      len++;
      continue;
    }
    for (int i = pos; i + len < n; i++) {
      s[i] = s[i + len];
    }
    n -= len;
    s[n] = 0;
  }
  puts(s);
  return 0;
}
