#include <bits/stdc++.h>
using namespace std;
int n, l, k, up, low, L, R, nup, nlow;
char g[1005][1005], s[1000005];
int main() {
  scanf("%d%d%d%s", &n, &l, &k, s + 1);
  sort(s + 1, s + n * l + 1);
  low = 1, up = n;
  L = 1, R = n * l;
  for (int i = 1; i <= l; i++) {
    for (int j = low; j <= k; j++) g[j][i] = s[L++];
    for (int j = up; j > k; j--) g[j][i] = s[R--];
    nlow = nup = k;
    while (nlow >= low && g[nlow][i] == g[k][i]) nlow--;
    while (nup <= up && g[nup][i] == g[k][i]) nup++;
    nlow++, nup--;
    for (int j = nlow - 1; j >= low; j--)
      for (int f = i + 1; f <= l; f++) g[j][f] = s[R--];
    for (int j = up; j > nup; j--)
      for (int f = i + 1; f <= l; f++) g[j][f] = s[R--];
    low = nlow, up = nup;
  }
  for (int i = 1; i <= n; i++) puts(g[i] + 1);
  return 0;
}
