#include <bits/stdc++.h>
using namespace std;
long long const MAXN = 1e3 + 8;
long long const INF = 1e12 + 8;
long long const delta = 1000000007;
char ans[MAXN][MAXN];
long long cnt[MAXN];
int main() {
  std::ios::sync_with_stdio(0);
  ;
  cin.tie(0);
  cout.tie(0);
  long long n, l, k;
  cin >> n >> l >> k;
  string s;
  cin >> s;
  long long mmin = INF;
  for (long long i = 0; i < s.size(); i++) {
    cnt[s[i] - 'a']++;
    mmin = min(mmin, (long long)(s[i] - 'a'));
  }
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < l; j++) ans[i][j] = '1';
  }
  long long ok = 0;
  for (long long i = 0; i < l; i++) {
    for (long long j = ok; j <= k - 1; j++) {
      ans[j][i] = mmin + 'a';
      cnt[mmin]--;
      while (!cnt[mmin]) mmin++;
    }
    while (ans[ok][i] < ans[k - 1][i] && ok < k - 1) ok++;
    if (ok == k - 1) break;
  }
  for (long long i = 0; i < l; i++) {
    if (ans[k - 1][i] != '1') continue;
    ans[k - 1][i] = mmin + 'a';
    cnt[mmin]--;
    while (!cnt[mmin]) mmin++;
  }
  for (long long i = 0; i < k - 1; i++) {
    for (long long j = 0; j < l; j++) {
      if (ans[i][j] != '1') continue;
      ans[i][j] = mmin + 'a';
      cnt[mmin]--;
      while (!cnt[mmin]) mmin++;
    }
  }
  for (long long i = k; i < n; i++) {
    for (long long j = 0; j < l; j++) {
      ans[i][j] = mmin + 'a';
      cnt[mmin]--;
      while (!cnt[mmin]) mmin++;
    }
  }
  for (long long i = 0; i < n; i++) cout << ans[i] << endl;
  return 0;
}
