#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, l, k;
  cin >> n >> l >> k;
  vector<int> cnt(26, 0);
  for (int i = 0; i < n * l; ++i) {
    char c;
    cin >> c;
    cnt[c - 'a']++;
  }
  int last = 0;
  int cur = 0;
  vector<string> ans(n, string(l, '#'));
  for (int i = 0; i < l; ++i) {
    while (!cnt[cur]) cur++;
    while (cnt[cur] < k - last && k - last > 0) {
      for (int j = 0; j < cnt[cur]; ++j) {
        ans[last + j][i] = char('a' + cur);
      }
      last += cnt[cur];
      cur++;
    }
    for (int j = 0; j < k - last; ++j) {
      ans[j + last][i] = char('a' + cur);
    }
    cnt[cur] -= k - last;
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < l; ++j) {
      if (ans[i][j] == '#') {
        cnt[cur]--;
        cout << char('a' + cur);
      } else
        cout << ans[i][j];
      while (!cnt[cur]) cur++;
    }
    cout << '\n';
  }
  return 0;
}
