#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 7;
int c[26];
vector<char> s;
string w[N];
int main() {
  int n, l, k;
  cin >> n >> l >> k;
  char ch;
  for (int i = 0; i < n * l; ++i) {
    cin >> ch;
    int x = ch - 'a';
    c[x]++;
  }
  for (int j = 0; j < 26; j++) {
    char ch = 'a' + j;
    for (int i = 0; i < c[j]; i++) {
      s.push_back(ch);
    }
  }
  int t = k;
  int v = 0;
  for (int i = 0; i < l; i++) {
    char rc = '#';
    int rcf = 0;
    for (int j = 0; j < t; j++) {
      int y = (j + k - 1) - (t - 1);
      w[y] += s[v];
      if (s[v] != rc) {
        rc = s[v];
        rcf = 1;
      } else {
        rcf++;
      }
      v++;
    }
    t = rcf;
  }
  for (int i = 0; i < n; i++) {
    int x = w[i].size();
    for (int j = 0; j < l - x; j++) {
      w[i] += s[v];
      v++;
    }
  }
  for (int i = 0; i < n; i++) {
    cout << w[i] << endl;
  }
}
