#include <bits/stdc++.h>
using namespace std;
mt19937_64 rang(
    chrono::high_resolution_clock::now().time_since_epoch().count());
int rng(int lim) {
  uniform_int_distribution<int> uid(0, lim - 1);
  return uid(rang);
}
long long INF = LLONG_MAX;
const long long M = 1000000007;
struct obj {
  long long x, y;
};
long long powm(long long, long long);
vector<vector<long long>> g;
vector<long long> ch;
long long fin[1005][1005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  long long l;
  cin >> l;
  long long k;
  cin >> k;
  string s;
  cin >> s;
  ch.assign(n * l, 0);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < l; j++) fin[i][j] = -1;
  for (int i = 0; i < n * l; i++) {
    ch[i] = (long long)(s[i] - 'a');
  }
  sort(ch.begin(), ch.end());
  long long upperend = 0, lowerend = k;
  long long curr = 0;
  long long pickup = 0;
  for (int i = 0; i < l; i++) {
    for (int j = upperend; j < lowerend; j++) {
      fin[j][i] = ch[pickup];
      pickup++;
    }
    long long peak = fin[lowerend - 1][i];
    for (int j = lowerend - 1; j >= 0; j--) {
      if (fin[j][i] == peak)
        upperend = j;
      else
        break;
    }
  }
  for (int i = 0; i < l; i++) {
    for (int j = 0; j < n; j++) {
      if (fin[j][i] == -1) {
        fin[j][i] = ch[pickup];
        pickup++;
      }
    }
  }
  for (int j = 0; j < n; j++) {
    for (int i = 0; i < l; i++) cout << (char)('a' + fin[j][i]);
    cout << endl;
  }
}
long long powm(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = (res * a) % M;
    a = (a * a) % M;
    b >>= 1;
  }
  return res;
}
