func_code_string: #include <bits/stdc++.h>   using namespace std;   int N, L, K;   string s;   int cnt[26];   string res[1000];   int main() {     ios_base::sync_with_stdio(false);     cin.tie(nullptr);     cin >> N >> L >> K;     cin >> s;     for (int i = 0; i < N * L; i++) cnt[s[i] -  a ]++;     int l = 0;     int t = 0;     while (l < K - 1 and t < 26) {       int st = cnt[t];       for (int j = 0, _t = cnt[t]; j < _t; j++) {         if (res[l + j % (K - l)].size() == L) {           l = K + 1;           break;         }         res[l + j % (K - l)] += (char)(t +  a );         cnt[t]--;       }       l += st % (K - l);       t++;     }     int lst = 25;     for (int i = 0; i < K - 1; i++) {       while (res[i].size() < L) {         while (cnt[lst] == 0) lst--;         res[i] += (char)(lst +  a );         cnt[lst]--;       }     }     int fst = 0;     for (int i = K - 1; i < N; i++) {       while (res[i].size() < L) {         while (cnt[fst] == 0) fst++;         res[i] += (char)(fst +  a );         cnt[fst]--;       }     }     sort(res, res + N);     for (int i = 0; i < N; i++) {       cout << res[i] <<   n ;     }   }   