func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     int n, i, j, k;     cin >> n;     vector<string> v;     vector<pair<int, string> > v1;     for (i = 0; i < n; i++) {       string s;       cin >> s;       v.push_back(s);       v1.push_back(make_pair(s.length(), s));     }     sort(v1.begin(), v1.end());     int flag = 1;     for (i = n - 1; i >= 0; i--) {       pair<int, string> temp = v1[i];       string s = temp.second;       for (j = 0; j < i; j++) {         pair<int, string> temp1 = v1[j];         string s1 = temp1.second;         if (s.length() != s1.length()) {           if (s.find(s1) != std::string::npos)             continue;           else {             flag = 0;             break;           }         } else {           if (s != s1) {             flag = 0;             break;           }         }       }       if (flag == 0) break;     }     if (flag == 0)       cout <<  NO n ;     else {       cout <<  YES n ;       for (i = 0; i < n; i++) cout << v1[i].second <<   n ;     }     return 0;   }   