#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p, q, x, y, f = 0;
  cin >> n >> p >> q;
  string s;
  cin >> s;
  for (int i = 0; i <= 100; i++) {
    for (int j = 0; j <= 100; j++) {
      if ((i * p) + (j * q) == n) {
        f = 1;
        x = i;
        y = j;
      }
    }
  }
  if (f == 0) {
    cout << "-1";
  } else {
    int g = 0;
    cout << x + y << endl;
    for (int i = 0; i < x; i++) {
      for (int j = 0; j < p; j++) {
        cout << s[g];
        g++;
      }
      cout << endl;
    }
    for (int i = 0; i < y; i++) {
      for (int j = 0; j < q; j++) {
        cout << s[g];
        g++;
      }
      cout << endl;
    }
  }
}
