#include <bits/stdc++.h>   using namespace std;   char ans[1010][1010];   int len[1010];   void upd(int n, int c) { ans[n][len[n]++] = c; }   char all[1 << 21];   int main() {     int n, k, l;     scanf( %d%d%d , &n, &l, &k);     scanf( %s , all);     sort(all, all + strlen(all));     int cur = 0;     int beg = 1;     while (beg < k) {       int beg_ = beg;       while (beg <= k) {         upd(beg, all[cur]);         beg++;         cur++;       }       beg = beg_;       for (int i = k; i >= beg_; i--)         if (ans[i][len[i] - 1] != ans[k][len[k] - 1]) {           beg = i + 1;           break;         }       if (len[k] == l) break;     }     while (len[k] < l) upd(k, all[cur++]);     for (int i = 1; i <= n; i++) {       while (len[i] < l) upd(i, all[cur++]);     }     for (int i = 1; i <= n; i++) puts(ans[i]);   }   