#include <bits/stdc++.h>   using namespace std;   const double eps = 1e-8;   const double pi = acos(-1.0);   const int INF = 0x3f3f3f3f;   const int mod = 1e9 + 7;   long long powmod(long long a, long long b) {     long long res = 1;     a %= mod;     assert(b >= 0);     for (; b; b >>= 1) {       if (b & 1) res = res * a % mod;       a = a * a % mod;     }     return res;   }   string s;   int main() {     int t, cas = 1;     cin >> s;     int n = ((int)(s).size());     for (int i = 1; i <= n / 2; i++) {       int cnt = 0;       for (int j = 0; j < n - i; j++) {         if (s[j] == s[j + i])           cnt++;         else           cnt = 0;         if (cnt == i) {           s = s.substr(0, j - i + 1) + s.substr(j + 1, n - j - 1);           n -= i;           i = 0;           break;         }       }     }     cout << s << endl;     return 0;   }   