func_code_string: #include <bits/stdc++.h>   using namespace std;   int main(int argc, char *argv[]) {     int n;     string str;     string ans =   ;     while (cin >> n) {       cin >> str;       int now = 0;       int vis[26];       ans =   ;       while (now < str.length()) {         char tmp = str[now];         int diff = 0;         memset(vis, 0, sizeof vis);         int flag = 0;         for (int i = now + 1; i < str.length(); i++) {           if (str[i] != tmp) {             flag = 1;             ans.push_back(tmp);             ans.push_back(str[i]);             now = i + 1;             break;           }           if (!vis[str[i] -  a ]) {             diff++;             if (diff > 2) {               flag = 1;               now = now + 1;               break;             }           }         }         if (flag == 0) {           break;         }       }       cout << str.length() - ans.length() << endl;       cout << ans << endl;     }   }   