#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, l, k;
  string s;
  cin >> n >> l >> k >> s;
  vector<string> w(n, string(l, '?'));
  sort(s.begin(), s.end());
  int cur = 0, ind = 0;
  for (int i = 0; i < l; ++i) {
    for (int j = cur; j < k; ++j) {
      w[j][i] = s[ind++];
    }
    for (int j = k - 1; ~j; --j) {
      if (w[j][i] == w[k - 1][i]) {
        cur = j;
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < l; ++j) {
      cout << (w[i][j] == '?' ? s[ind++] : w[i][j]);
    }
    cout << "\n";
  }
  return 0;
}
