#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000000;
char res[MAXN + 5];
int act, n, k;
char val;
int main() {
  scanf("%d %d", &n, &k);
  if (k > n || (n > 1 && k == 1)) {
    printf("-1\n");
    return 0;
  }
  if (k == n) {
    val = 'a';
    for (int i = 1; i <= n; ++i) printf("%c", val++);
    printf("\n");
    return 0;
  }
  val = 'c';
  for (int i = 1; i <= n - (k - 2); ++i) {
    if (i % 2)
      res[i - 1] = 'a';
    else
      res[i - 1] = 'b';
  }
  for (int i = n - (k - 2) + 1; i <= n; ++i) {
    res[i - 1] = val++;
  }
  printf("%s\n", res);
  return 0;
}
