#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, l, k;
  cin >> n >> l >> k;
  string s;
  cin >> s;
  sort(s.begin(), s.end());
  long long ind = 0;
  vector<char> ans[n + 1];
  set<long long> z;
  for (long long i = 1; i < k; i++) z.insert(i);
  while (1) {
    for (auto i : z) {
      ans[i].push_back(s[ind++]);
    }
    ans[k].push_back(s[ind++]);
    vector<long long> temp;
    for (auto i : z) {
      if (ans[i].back() != ans[k].back()) temp.push_back(i);
    }
    for (auto i : temp) z.erase(i);
    if (z.size() == 0 || ans[k].size() == l) break;
  }
  while (ans[k].size() < l) {
    ans[k].push_back(s[ind++]);
  }
  for (long long i = 1; i <= n; i++) {
    while (ans[i].size() < l) {
      ans[i].push_back(s[ind++]);
    }
  }
  for (long long i = 1; i <= n; i++) {
    for (auto i : ans[i]) cout << i;
    cout << "\n";
  }
  clock_t clk;
  clk = clock();
  clk = clock() - clk;
  cerr << fixed << setprecision(6) << "Time: " << ((double)clk) / CLOCKS_PER_SEC
       << "\n";
  return 0;
}
