#include <bits/stdc++.h>
using namespace std;
const int maxn = 1100000;
char s[11000000];
int n, r, c;
int len[maxn], nex[maxn];
int rig[maxn], res[maxn], dep[maxn];
vector<int> g[maxn];
void dfs(int x) {
  res[dep[x]] = x;
  rig[x] = res[max(0, dep[x] - r)];
  for (int i = 0; i < g[x].size(); ++i) {
    dep[g[x][i]] = dep[x] + 1;
    dfs(g[x][i]);
  }
}
void gao() {
  for (int i = 0, j = 1; i < n; ++i) {
    while (j <= n && len[j] - len[i] <= c) ++j;
    nex[i] = j - 1;
    if (nex[i] != i) g[j - 1].push_back(i);
  }
  nex[n] = n;
}
int main() {
  scanf("%d %d %d", &n, &r, &c);
  c++;
  getchar();
  gets(s);
  int lenn = strlen(s);
  for (int i = 0, j = 0; i < n; ++i) {
    while (j < lenn && (s[j] < 'a' || s[j] > 'z')) ++j;
    len[i] = j;
    while (j < lenn && ('a' <= s[j] && s[j] <= 'z')) ++j;
  }
  len[n] = lenn + 1;
  gao();
  for (int i = 0; i <= n; ++i)
    if (nex[i] == i) {
      dep[i] = 0;
      dfs(i);
    }
  int x = 0, y = 0, z = 0;
  for (int i = 0; i < n; ++i)
    if (rig[i] - i > x) {
      y = i;
      z = rig[i];
      x = rig[i] - i;
    }
  if (!x) return 0;
  for (int i = y; i != z; i = nex[i]) {
    for (int j = len[i]; j < len[nex[i]] - 1; ++j) putchar(s[j]);
    puts("");
  }
  return 0;
}
