#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  if (k > n) {
    printf("-1\n");
    return 0;
  }
  if (k == 1 && n != 1) {
    printf("-1\n");
    return 0;
  }
  if (k == 1 && n == 1) {
    printf("a\n");
    return 0;
  }
  int cnt = n;
  bool p = 1;
  while (cnt != (k - 2)) {
    if (p)
      printf("%c", 'a');
    else
      printf("%c", 'b');
    p = !p;
    cnt--;
  }
  char now = 'c';
  for (int i = 0; i < k - 2; ++i) printf("%c", now++);
  printf("\n");
  return 0;
}
