#include <bits/stdc++.h>
using namespace std;
int main() {
  char *str = new char[50002];
  scanf("%s", str);
  int stringLength = strlen(str);
  for (int substringLength = 1; substringLength * 2 <= stringLength;
       substringLength++) {
    int newStringLength = substringLength;
    for (int curentPosition = substringLength, matchedCharacterCount = 0;
         curentPosition < stringLength; curentPosition++) {
      if (str[curentPosition] == str[curentPosition - substringLength])
        matchedCharacterCount++;
      else
        matchedCharacterCount = 0;
      if (matchedCharacterCount == substringLength) {
        newStringLength -= substringLength;
        matchedCharacterCount = 0;
      }
      str[newStringLength] = str[curentPosition];
      newStringLength++;
    }
    stringLength = newStringLength;
  }
  str[stringLength] = '\0';
  printf("%s", str);
  return 0;
}
