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