#include <bits/stdc++.h>
using namespace std;
void swap(int& a, int& b) {
  int tmp = a;
  a = b;
  b = tmp;
}
void countSortLex(char arr[]) {
  char output[strlen(arr)];
  int count[256], i;
  memset(count, 0, sizeof(count));
  for (i = 0; arr[i]; ++i) ++count[arr[i]];
  for (i = 1; i <= 255; ++i) count[i] += count[i - 1];
  for (i = 0; arr[i]; ++i) {
    output[count[arr[i]] - 1] = arr[i];
    --count[arr[i]];
  }
  for (i = 0; arr[i]; ++i) arr[i] = output[i];
}
int partition(char letters[], int low, int high) {
  int pivot = letters[high];
  int i = (low - 1);
  for (int j = low; j <= high - 1; ++j) {
    if (letters[j] <= pivot) {
      ++i;
      swap(letters[i], letters[j]);
    }
  }
  swap(letters[i + 1], letters[high]);
  return (i + 1);
}
void quickSortLex(char letters[], int low, int high) {
  if (low < high) {
    int pivot = partition(letters, low, high);
    quickSortLex(letters, low, pivot - 1);
    quickSortLex(letters, pivot + 1, high);
  }
}
void sort_lex(char letters[], int size) {
  for (int i = 0; i < size; i++) {
    int min = letters[i];
    for (int j = i + 1; j < size; j++) {
      if (letters[j] < letters[i]) {
        swap(letters[j], letters[i]);
      }
    }
  }
}
int main() {
  int n, l, k;
  cin >> n >> l >> k;
  char letters[n * l];
  cin >> letters;
  char words[n][l + 1];
  memset(words, '\0', n * (l + 1) * sizeof(char));
  countSortLex(letters);
  if (letters[0] == letters[n * l - 1]) {
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < l; ++j) {
        cout << letters[0];
      }
      cout << endl;
    }
    return 0;
  }
  int letter_count = 0;
  int upper_bound = 0;
  int lower_bound = k - 1;
  int temp = 0;
  int last_big_upper = 0;
  for (int i = 0; i < k; ++i) {
    words[i][0] = letters[letter_count];
    ++letter_count;
  }
  for (int count = 1; count < l; ++count) {
    temp = 0;
    while (letters[letter_count - temp - 2] == letters[letter_count - 1] &&
           temp < (lower_bound - upper_bound)) {
      temp++;
    }
    upper_bound = k - temp - 1;
    for (int i = upper_bound; i <= lower_bound; ++i) {
      words[i][count] = letters[letter_count];
      ++letter_count;
    }
  }
  int new_count = n * l - 1;
  int pos;
  for (int i = n - 1; i >= 0; --i) {
    pos = l - 1;
    while (words[i][pos] == '\0' && pos >= 0) {
      words[i][pos] = letters[new_count];
      --new_count;
      --pos;
    }
  }
  for (int i = 0; i < n; i++) {
    cout << words[i] << endl;
  }
}
