#include <bits/stdc++.h>
int main() {
  int n, k, i, start;
  bool b;
  while (scanf("%d%d", &n, &k) != EOF) {
    if (n < k || k == 1 && n > 1) {
      printf("-1\n");
      continue;
    }
    start = k;
    for (i = b = 0; i < n; i++) {
      if (b && n - i == k - 2) {
        start = 2;
        break;
      }
      if (!b && n - i == k - 1) {
        start = 1;
        break;
      }
      printf(i& 1 ? b = 1, "b" : "a");
    }
    for (i = start; i < k; i++) printf("%c", i + 'a');
    printf("\n");
  }
  return 0;
}
