#include <bits/stdc++.h>
using namespace std;
string A[1000005];
char ST[5000005];
int F[1000005], S[1000005];
int Go[22][1000005];
int main() {
  int n, r, c, i, j, k, l;
  scanf("%d%d%d", &n, &r, &c);
  for (i = 1; i <= n; i++) {
    scanf("%s", ST);
    A[i] = ST;
    S[i] = S[i - 1] + A[i].size();
  }
  F[n + 1] = n + 1;
  j = n + 1;
  for (i = n; i >= 1; i--) {
    while (S[j - 1] - S[i - 1] + (j - i - 1) > c) j--;
    F[i] = j;
  }
  for (i = 1; i <= n + 1; i++) Go[0][i] = F[i];
  for (j = 1; j < 21; j++)
    for (i = 1; i <= n + 1; i++) Go[j][i] = Go[j - 1][Go[j - 1][i]];
  int ans = 0, ansi = 0, anse = 0;
  for (i = 1; i <= n; i++) {
    k = i;
    for (j = 0; j < 21; j++)
      if ((1 << j) & r) k = Go[j][k];
    if (ans < k - i) {
      ans = k - i;
      ansi = i;
      anse = k;
    }
  }
  i = ansi;
  while (i != anse) {
    for (j = i; j < F[i] - 1; j++) cout << A[j] << ' ';
    cout << A[j] << endl;
    i = F[i];
  }
  return 0;
}
