#include <bits/stdc++.h>
using namespace std;
signed main() {
  std::ios::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 sim = 0;
  vector<char> ans[n];
  long long p = 0;
  while (ans[k - 1].size() < l) {
    for (long long i = sim; i < k; i++) {
      ans[i].push_back(s[p]);
      p++;
    }
    for (long long i = k - 2; i >= sim; i--) {
      long long len = ans[i].size();
      if (ans[i][len - 1] != ans[k - 1][len - 1]) {
        sim = i + 1;
        break;
      }
    }
  }
  for (long long i = 0; i < n; i++) {
    while (ans[i].size() < l) {
      ans[i].push_back(s[p]);
      p++;
    }
  }
  for (long long i = 0; i < n; i++) {
    for (char c : ans[i]) {
      cout << c;
    }
    cout << "\n";
  }
  return 0;
}
