#include <bits/stdc++.h>
char a[1000010];
int main() {
  int n, k, m = 0;
  scanf("%d%d", &n, &k);
  if (n < k || (k == 1 && n != 1)) {
    printf("-1\n");
    return 0;
  }
  if (k == 1 && n == 1) {
    printf("a\n");
    return 0;
  }
  a[n] = 0;
  for (int i = 0; i < k - 2; i++) a[n - i - 1] = k - i - 1 + 'a';
  for (int i = 0; i + k - 2 < n; i++) a[i] = i % 2 + 'a';
  printf("%s\n", a);
  return 0;
}
