#include <bits/stdc++.h>
using namespace std;
int amount, length, index_min;
string form;
int letters[300];
void count_letters() {
  for (int i = 0, run_to = amount * length; i < run_to; i++) letters[form[i]]++;
}
string result_row[1005];
void phase_one() {
  int start = 1;
  for (int i = 'a'; i <= 'z'; i++) {
    int need = index_min - start + 1;
    while (result_row[index_min].size() < length && letters[i] >= need) {
      for (int j = start; j <= index_min; j++) result_row[j] += i;
      letters[i] -= need;
    }
    if (result_row[index_min].size() == length) return;
    for (int j = start, run_to = start + letters[i] - 1; j <= run_to; j++)
      result_row[j] += i;
    start += letters[i];
    letters[i] = 0;
  }
}
void phase_two() {
  int word_now = 'a';
  for (int i = 1; i <= amount; i++) {
    while (result_row[i].size() < length) {
      while (!letters[word_now]) word_now++;
      result_row[i] += word_now;
      letters[word_now]--;
    }
  }
}
void solve() {
  count_letters();
  phase_one();
  phase_two();
  for (int i = 1; i <= amount; i++) cout << result_row[i] << endl;
}
int main() {
  scanf("%d %d %d", &amount, &length, &index_min);
  cin >> form;
  solve();
}
