#include <bits/stdc++.h>
using namespace std;
const long long maxn = 100010;
const long long mod = 1000000007;
const long long inf = 2000000000;
const long long inf64 = inf * inf;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, l, k, cnt, j, i;
  cin >> n >> l >> k;
  string str;
  cin >> str;
  sort(str.begin(), str.end());
  if (k == 1) {
    for (int i = 0; i < n; i++) cout << str.substr(i * l, l) << "\n";
    return 0;
  }
  vector<string> res(n);
  fill(res.begin(), res.end(), string(l, '0'));
  set<int> st;
  for (int i = 0; i < k; i++) st.insert(i);
  for (cnt = 0, j = 0; cnt < l; cnt++) {
    for (auto i : st) res[i][cnt] = str[j++];
    vector<int> to_erase;
    for (auto i : st)
      if (res[i][cnt] < res[k - 1][cnt]) to_erase.push_back(i);
    for (auto i : to_erase) st.erase(i);
  }
  for (int a = 0; a < n; a++)
    for (int b = 0; b < l; b++)
      if (res[a][b] == '0') res[a][b] = str[j++];
  for (auto i : res) cout << i << "\n";
  return 0;
}
