#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 5;
int a[maxn];
int b[maxn];
int a0[maxn];
int mans = 0;
bool eaten[maxn];
int n;
int f(int l, int r) {
  if (l > r) return 0;
  if (l == r) return 0;
}
int main() {
  string s;
  cin >> s;
  int i = 1;
  while (2 * i <= s.length()) {
    bool was = 0;
    for (int j = 0; j <= (int)s.length() - 2 * i; j++) {
      bool ok = 1;
      for (int t = 0; t < i; t++) {
        if (s[j + t] != s[j + i + t]) {
          ok = 0;
          break;
        }
      }
      if (ok) {
        was = 1;
        s.erase(s.begin() + j, s.begin() + j + i);
      }
    }
    if (!was) i++;
  }
  cout << s << endl;
  return 0;
}
