#include <bits/stdc++.h>
using namespace std;
const int MXN = (int)1e6 + 7;
char s[MXN];
char ans[1005][1005];
int n, k, l;
void bd2(int st, int ed, int p, int pos) {
  for (int i = st; i <= ed; i++) {
    for (int j = p; j <= l; j++) {
      ans[i][j] = s[pos++];
    }
  }
}
void go(int dep, int ll, int rr, int l2, int r2) {
  if (dep > l || ll > rr || l2 > r2) return;
  for (int i = ll; i <= rr; i++) {
    ans[i][dep] = s[l2++];
  }
  int mid = ll;
  while (ans[mid][dep] != ans[rr][dep]) mid++;
  r2 -= (mid - ll) * (l - dep);
  bd2(ll, mid - 1, dep + 1, r2 + 1);
  go(dep + 1, mid, rr, l2, r2);
}
int main() {
  scanf("%d %d %d %s", &n, &l, &k, s + 1);
  sort(s + 1, s + n * l + 1);
  bd2(k + 1, n, 1, k * l + 1);
  go(1, 1, k, 1, k * l);
  for (int i = 1; i <= n; i++) printf("%s\n", ans[i] + 1);
  return 0;
}
