func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     string s;     cin >> s;     char g[s.length()];     int j = 0;     for (int i = 2; i < s.length(); i++) {       if (s[i] == s[i - 1] && s[i - 1] == s[i - 2] && s[i] !=  0 ) {         s[i - 2] =  0 ;         char cc = s[i];         while (i + 1 < s.length() && s[i + 1] == cc) {           s[i + 1] =  0 ;           i++;         }       }     }     for (int i = 0; i < s.length(); i++) {       if (s[i] !=  0 ) g[j] = s[i], j++;     }     for (int i = 3; i < j; i++) {       if (g[i] == g[i - 1] && g[i - 2] == g[i - 3]) {         g[i] =  0 ;       }     }     for (int i = 0; i < j; i++)       if (g[i] !=  0 ) cout << g[i];   }   