#include <bits/stdc++.h>
using namespace std;
void read(int &x) {
  x = 0;
  int f = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') f = -f;
  for (; isdigit(ch); ch = getchar()) x = x * 10 + ch - '0';
  x *= f;
}
void print(int x) {
  if (x < 0) putchar('-'), x = -x;
  if (!x) return;
  print(x / 10), putchar(x % 10 + 48);
}
void write(int x) {
  if (!x)
    putchar('0');
  else
    print(x);
  putchar('\n');
}
const int maxn = 1e3 + 10;
const int inf = 1e9;
const double eps = 1e-8;
const int mod = 1e9 + 7;
char s[maxn][maxn], t[maxn * maxn];
int n, l, k, r[200];
void solve(int x, int a, int p) {
  if (p > 'z') return;
  if (!r[p]) {
    solve(x, a, p + 1);
    return;
  }
  int w = r[p] / (k - x + 1);
  for (int i = x; i <= k; i++)
    for (int j = a; j <= min(a + w - 1, l); j++) s[i][j] = p;
  if (a + w - 1 >= l) {
    r[p] -= (l - a + 1) * (k - x + 1);
    return;
  }
  int q = r[p] - w * (k - x + 1);
  for (int i = x; i < x + q; i++) s[i][a + w] = p;
  r[p] = 0;
  solve(x + q, a + w, p + 1);
}
int main() {
  read(n), read(l), read(k);
  scanf("%s", t + 1);
  for (int i = 1; i <= n * l; i++) r[(int)t[i]]++;
  solve(1, 1, 'a');
  int p = 'a';
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= l; j++)
      if (!s[i][j]) {
        if (r[p])
          r[p]--, s[i][j] = p;
        else {
          while (!r[p]) p++;
          r[p]--, s[i][j] = p;
        }
      }
  for (int i = 1; i <= n; i++) printf("%s\n", s[i] + 1);
  return 0;
}
