func_code_string: #include <bits/stdc++.h>   using namespace std;   string run(vector<string> &vec) {     vector<bool> used(vec.size(), false);     vector<char> ans(100,  1 );     for (int i = 0; i < vec[0].size(); ++i) {       ans[50 + i] = vec[0][i];     }     used[0] = true;     while (true) {       int count = 0;       for (int i = 1; i < vec.size(); ++i) {         if (not used[i]) {           bool thr = false;           for (int p = 0; p < vec[i].size() && !thr; ++p) {             for (int k = 0; k < ans.size() && !thr; ++k) {               if (ans[k] == vec[i][p]) {                 int in = k - p;                 for (int np = 0; np < vec[i].size(); ++np) {                   ans[in + np] = vec[i][np];                 }                 used[i] = true;                 count += 1;                 thr = true;               }             }           }         }       }       if (count == 0) break;     }     int sz = 0;     for (int i = 0; i < vec.size(); ++i) {       if (not used[i]) {         vec[sz] = vec[i];         ++sz;       }     }     vec.resize(sz);     string ret;     for (int i = 0; i < ans.size(); ++i) {       if (ans[i] !=  1 ) {         ret += ans[i];       }     }     return ret;   }   int main() {     int n;     cin >> n;     vector<string> vs(n);     for (int i = 0; i < n; ++i) {       cin >> vs[i];     }     string ans;     while (not vs.empty()) {       string c1 = run(vs);       ans += c1;     }     cout << ans;     return 0;   }   