#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, l, k;
  cin >> n >> l >> k;
  string s;
  cin >> s;
  char a[n][l];
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < l; ++j) {
      a[i][j] = '!';
    }
  }
  vector<long long> f(26, 0LL);
  for (int i = 0; i < (long long)s.length(); ++i) {
    f[s[i] - 'a']++;
  }
  vector<long long> r(26, 0LL);
  long long start = 0, counter = -1;
  sort(s.begin(), s.end());
  long long h = k;
  for (int i = 0; i < l; ++i) {
    for (int j = start; j < k; ++j) {
      ++counter;
      a[j][i] = s[counter];
      r[s[counter] - 'a']++;
    }
    start = k - r[s[counter] - 'a'];
    h = start;
    for (auto &x : r) x = 0;
  }
  ++counter;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < l; ++j) {
      if (a[i][j] == '!') {
        a[i][j] = s[counter];
        ++counter;
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < l; ++j) {
      cout << a[i][j];
    }
    cout << endl;
  }
  return 0;
}
