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