#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, l, k;
  cin >> n >> l >> k;
  string s;
  cin >> s;
  sort(s.begin(), s.end());
  if (k == 1) {
    long long pos = 0;
    for (long long i = 0; i < n; i++) {
      for (long long j = 0; j < l; j++) {
        cout << s[pos];
        pos++;
      }
      cout << "\n";
    }
    return 0;
  }
  long long pos = 0;
  long long ini = 0;
  vector<string> ans(n, "");
  for (long long i = 0; i < l; i++) {
    for (long long j = ini; j < k; j++) {
      ans[j] += s[pos];
      pos++;
    }
    while (ans[ini][i] != ans[k - 1][i]) ini++;
    if (ini == k - 1) {
      while (ans[k - 1].size() < l) {
        ans[k - 1] += s[pos];
        pos++;
      }
      break;
    }
  }
  for (long long i = 0; i < n; i++) {
    while (ans[i].size() < l) {
      ans[i] += s[pos];
      pos++;
    }
  }
  for (long long i = 0; i < n; i++) cout << ans[i] << "\n";
  return 0;
}
