#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, a, b, i, j, k, x, y;
  char px;
  string s;
  cin >> m >> a >> b;
  cin >> s;
  x = 0;
  y = 0;
  for (i = 0; i <= 100; i++)
    for (j = 0; j <= 100; j++)
      if (a * i + b * j == m) {
        x = i;
        y = j;
        break;
      }
  if ((x == 0) && (y == 0))
    cout << -1 << endl;
  else {
    cout << (x + y) << endl;
    for (i = 1; i <= x; i++) {
      for (j = 0; j < a; j++) cout << s[(i - 1) * a + j];
      cout << endl;
    }
    for (i = 1; i <= y; i++) {
      for (j = 0; j < b; j++) cout << s[a * x + (i - 1) * b + j];
      cout << endl;
    }
  }
}
