#include <bits/stdc++.h>
using namespace std;
int n, l, k;
char s[1000005];
char g[1005][1005];
queue<char> q;
int main() {
  cin >> n >> l >> k;
  cin >> s;
  int it = 0, lo = 0;
  sort(s, s + strlen(s));
  for (int i = 0; i < l; i++)
    for (int j = lo; j <= k - 1; j++) {
      if (it > 0 && s[it] != s[it - 1]) lo = j;
      g[j][i] = s[it++];
    }
  for (int i = 0; i < l; i++)
    for (int j = 0; j < n; j++)
      if (!g[j][i]) g[j][i] = s[it++];
  for (int i = 0; i < n; i++) {
    g[i][l] = 0;
    printf("%s\n", g[i]);
  }
  return 0;
}
