#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  string s;
  cin >> s;
  int f = -1;
  for (int i = 0; i * a <= n; i++) {
    int c = n - i * a;
    if (c % b == 0) {
      f = i;
      break;
    }
  }
  if (f == -1)
    cout << -1;
  else {
    int c = n - f * a;
    int d = c / b;
    int i, j = 0;
    cout << f + d << endl;
    for (i = 0; i < f; i++) {
      int k = j + a;
      for (j; j < k; j++) cout << s[j];
      cout << endl;
    }
    for (i = 0; i < d; i++) {
      int k = j + b;
      for (j; j < k; j++) cout << s[j];
      cout << endl;
    }
  }
}
