#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 6;
int main() {
  int n, m;
  cin >> n;
  string s;
  cin >> n >> m >> s;
  for (int x = 0; x <= 111; ++x)
    for (int y = 0; y <= 111; ++y)
      if (x * n + y * m == s.length()) {
        cout << x + y << endl;
        int k = 0;
        for (int i = 0; i < x; ++i) cout << s.substr(k, n) << endl, k += n;
        for (int i = 0; i < y; ++i) cout << s.substr(k, m) << endl, k += m;
        return 0;
      }
  cout << -1;
  return 0;
}
