#include <bits/stdc++.h>
using namespace std;
int fillVert(string res[], int l, int k, string &s1) {
  int base = 0, x = 0;
  for (int i = 0; i < l; i++) {
    int newX = x;
    for (int j = x; j < k; j++) {
      res[j].push_back(s1[base++]);
      if (j != 0 && res[j][i] != res[j - 1][i]) newX = j;
    }
    x = newX;
  }
  return base;
}
void makeTop(string res[], int l, int k, string &s1) {
  int base = fillVert(res, l, k, s1);
  for (int i = 0; i < k - 1; i++)
    for (int j = res[i].size(); j < l; j++) res[i].push_back(s1[base++]);
  return;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int n, l, k;
  cin >> n >> l >> k;
  string s1;
  cin >> s1;
  sort(s1.begin(), s1.end());
  string res[n];
  makeTop(res, l, k, s1);
  for (int i = k; i < n; i++)
    for (int j = 0; j < l; j++) res[i].push_back(s1[i * l + j]);
  for (int i = 0; i < n; i++) cout << res[i] << endl;
  return 0;
}
