#include <bits/stdc++.h>
using namespace std;
void fun() {}
int md = 1e9 + 7;
int __gcd(int a, int b) {
  if (b == 0) return a;
  return __gcd(b, a % b);
}
int poww(int a, int b, int md) {
  if (b < 0) return 0;
  if (a == 0) return 0;
  int res = 1;
  while (b) {
    if (b & 1) {
      res = (1ll * res * a) % md;
    }
    a = (1ll * a * a) % md;
    b >>= 1;
  }
  return res;
}
int poww(int a, int b) {
  if (b < 0) return 0;
  if (a == 0) return 0;
  int res = 1;
  while (b) {
    if (b & 1) {
      res = (1ll * res * a);
    }
    a = (1ll * a * a);
    b >>= 1;
  }
  return res;
}
void ainp(int arr[], int n) {
  for (int i = 1; i <= n; i++) cin >> arr[i];
}
void disp(int arr[], int n) {
  for (int i = 1; i <= n; i++) cout << arr[i] << " ";
  cout << "\n";
}
void dispv(vector<int> &v) {
  for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
  cout << "\n";
}
int divide(int a, int b, int md) {
  int rr = a * (poww(b, md - 2, md));
  rr %= md;
  return rr;
}
const int size = 1001;
int n, l, k;
string s;
string ans[size];
char lastcharacter[size];
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  fun();
  cin >> n >> l >> k >> s;
  sort(s.begin(), s.end());
  int small = 0;
  int ptbegin = 1, ptend = k * l;
  for (int i = 1; i <= l; i++) {
    for (int j = 1; j <= small; j++) lastcharacter[j] = s[ptend - 1], ptend--;
    for (int j = small + 1; j <= k; j++)
      lastcharacter[j] = s[ptbegin - 1], ptbegin++;
    for (int j = small + 1; j <= k && lastcharacter[j] < lastcharacter[k]; j++)
      small = j;
    for (int j = 1; j <= k; j++) ans[j].push_back(lastcharacter[j]);
  }
  int pt2 = k * l + 1;
  for (int i = k + 1; i <= n; i++) {
    for (int j = 1; j <= l; j++) {
      ans[i].push_back(s[pt2 - 1]);
      pt2++;
    }
  }
  sort(ans + 1, ans + 1 + n);
  for (int i = 1; i <= n; i++) cout << ans[i] << "\n";
  return 0;
}
