#include <bits/stdc++.h>
using namespace std;
int N, L, K;
string S;
char ans[1005][1005];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> N >> L >> K >> S;
  K--;
  sort(S.begin(), S.end());
  for (int i = 0; i < N; i++)
    for (int j = 0; j < L; j++) ans[i][j] = '$';
  int first_idx = 0, s_idx = 0;
  for (int j = 0; j < L; j++) {
    for (int i = first_idx; i <= K; i++) ans[i][j] = S[s_idx++];
    first_idx = K;
    while (first_idx > 0 && ans[first_idx - 1][j] == ans[K][j]) first_idx--;
  }
  for (int i = 0; i < N; i++)
    for (int j = 0; j < L; j++)
      if (ans[i][j] == '$') ans[i][j] = S[s_idx++];
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < L; j++) cout << ans[i][j];
    cout << "\n";
  }
  return 0;
}
