#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
const int MAXN = 1000;
const int MAXLEN = 1000;
int n, len, idx;
char s[MAXN * MAXLEN + 1];
char ans[MAXN][MAXLEN + 1];
int cnt[26];
void solve() {
  memset(cnt, 0, sizeof(cnt));
  for (int i = (0); i < (n * len); ++i) ++cnt[s[i] - 'a'];
  for (int i = (0); i < (n); ++i) {
    for (int j = (0); j < (len); ++j) ans[i][j] = '?';
    ans[i][len] = '\0';
  }
  int row = 0, col = 0;
  for (int c = (0); c < (26); ++c)
    if (cnt[c] > 0) {
      int vert = idx + 1 - row;
      int hor = min(len - col, cnt[c] / vert);
      for (int j = (0); j < (hor); ++j)
        for (int i = (0); i < (vert); ++i) ans[row + i][col + j] = 'a' + c;
      cnt[c] -= vert * hor;
      col += hor;
      if (col < len) {
        int rem = cnt[c];
        assert(rem < vert);
        for (int i = (0); i < (rem); ++i) ans[row + i][col] = 'a' + c;
        cnt[c] -= rem;
        row += rem;
      }
    }
  int at = 0;
  for (int i = (0); i < (n); ++i)
    for (int j = (0); j < (len); ++j)
      if (ans[i][j] == '?') {
        while (at < 26 && cnt[at] == 0) ++at;
        assert(at < 26);
        ans[i][j] = 'a' + at;
        --cnt[at];
      }
}
void run() {
  scanf("%d%d%d", &n, &len, &idx);
  --idx;
  scanf("%s", s);
  assert(strlen(s) == n * len);
  solve();
  for (int i = (0); i < (n); ++i) printf("%s\n", ans[i]);
}
int main() {
  run();
  return 0;
}
