#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p, q;
  cin >> n >> p >> q;
  int kp = 0, kq = 0;
  string s;
  cin >> s;
  for (int i = 0; i <= 100; i++) {
    for (int j = 0; j <= 100; j++) {
      if (i * p + j * q == n) {
        kp = i;
        kq = j;
        break;
      }
    }
  }
  if (kp == 0 && kq == 0) {
    cout << -1;
    return 0;
  }
  cout << kp + kq << endl;
  int l = 0;
  for (int i = 0; i < kp; i++) {
    for (int j = 0; j < p; j++) {
      cout << s[l];
      l++;
    }
    cout << endl;
  }
  for (int i = 0; i < kq; i++) {
    for (int j = 0; j < q; j++) {
      cout << s[l];
      l++;
    }
    cout << endl;
  }
  return 0;
}
