#include <bits/stdc++.h>
using namespace std;
char s[1000005];
int a[1005][1005];
int id, n, l, k;
void work(int pos, int be) {
  if (pos > l) return;
  for (int i = be; i <= k; i++) a[i][pos] = s[++id];
  int pre = k;
  while (pre > be && a[pre - 1][pos] == a[k][pos]) pre--;
  work(pos + 1, pre);
}
int main() {
  scanf("%d%d%d", &n, &l, &k);
  scanf("%s", s + 1);
  int len = strlen(s + 1);
  sort(s + 1, s + 1 + len);
  memset(a, 0, sizeof(a));
  id = 0;
  work(1, 1);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= l; j++) {
      if (!a[i][j]) a[i][j] = s[++id];
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= l; j++) putchar(a[i][j]);
    putchar('\n');
  }
  return 0;
}
