#include <bits/stdc++.h>
using namespace std;
template <typename X>
ostream& operator<<(ostream& x, const vector<X>& v) {
  for (int i = 0; i < v.size(); ++i) x << v[i] << " ";
  return x;
}
template <typename X>
ostream& operator<<(ostream& x, const set<X>& v) {
  for (auto it : v) x << it << " ";
  return x;
}
template <typename X, typename Y>
ostream& operator<<(ostream& x, const pair<X, Y>& v) {
  x << v.ff << " " << v.ss;
  return x;
}
template <typename T, typename S>
ostream& operator<<(ostream& os, const map<T, S>& v) {
  for (auto it : v) os << it.first << "=>" << it.second << endl;
  return os;
}
struct pair_hash {
  inline std::size_t operator()(const std::pair<int, int>& v) const {
    return v.first * 31 + v.second;
  }
};
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
const int N = 100005;
int main() {
  int n, l, k;
  cin >> n >> l >> k;
  string s;
  cin >> s;
  --k;
  sort(s.begin(), s.end());
  char mat[n][l];
  int i = 0;
  int ui = 0;
  int rr = 0;
  memset(mat, '*', sizeof mat);
  while (rr < l) {
    for (long long j = ui; j < k + 1; j++) {
      mat[j][rr] = s[i++];
    }
    int kk = k;
    while (mat[kk][rr] == mat[k][rr]) {
      kk--;
      if (kk == -1) {
        break;
      }
    }
    ui = kk + 1;
    rr++;
  }
  for (long long r = 0; r < n; r++) {
    for (long long c = 0; c < l; c++) {
      if (mat[r][c] == '*') {
        mat[r][c] = s[i++];
      }
    }
  }
  for (long long r = 0; r < n; r++) {
    for (long long c = 0; c < l; c++) {
      cout << mat[r][c];
    }
    cout << endl;
  }
}
