#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n, k;
  cin >> n >> k;
  if (k > n || k > 26) {
    cout << -1 << endl;
    return 0;
  }
  if (k == 1) {
    if (n == 1)
      cout << 'a' << endl;
    else
      cout << -1 << endl;
    return 0;
  }
  bool a = true;
  for (int i = 0; i < n - k + 2; i++) {
    if (a)
      cout << 'a';
    else
      cout << 'b';
    a = !a;
  }
  n = n - (n - k + 2);
  char let = 'c';
  for (int i = 0; i < n; i++) {
    cout << let;
    let++;
  }
  cout << endl;
}
