#include <bits/stdc++.h>
using namespace std;
class Letter {
 public:
  char c;
  int count = 0;
  explicit Letter(char c, int count) : c(c), count(count) {}
};
int letterIndex = 0;
int indexOfLetter = 0;
char getNextLetter(vector<Letter *> &list) {
  auto letter = list[letterIndex];
  char c = letter->c;
  indexOfLetter++;
  if (indexOfLetter >= letter->count) {
    indexOfLetter = 0;
    letterIndex++;
  }
  return c;
}
int main() {
  ios::sync_with_stdio(false);
  int n, l, k;
  string letters;
  cin >> n >> l >> k >> letters;
  int letterCounts[26] = {0};
  for (char c : letters) {
    letterCounts[c - 'a']++;
  }
  vector<Letter *> list;
  for (int i = 0; i < 26; i++) {
    if (letterCounts[i] > 0) {
      list.emplace_back(new Letter((char)('a' + i), letterCounts[i]));
    }
  }
  char answer[1001][1001] = {0};
  int row = 0;
  for (int i = 0; i < l; i++) {
    for (int j = row; j < k; j++) {
      answer[j][i] = getNextLetter(list);
      if (j > 0 && answer[j][i] != answer[j - 1][i]) {
        row = j;
      }
    }
  }
  for (int i = 0; i < l; i++) {
    for (int j = 0; j < n; j++) {
      if (answer[j][i] == 0) {
        answer[j][i] = getNextLetter(list);
      }
    }
  }
  for (int i = 0; i < n; i++) {
    cout << answer[i] << endl;
  }
  return 0;
}
