#include <bits/stdc++.h>
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  int b = m - 2, a = n - b;
  char prev;
  if (n == m) {
    char j = 'a';
    while (n) {
      printf("%c", j);
      j++;
      n--;
    }
  } else if (m < 2 || m > n)
    printf("-1\n");
  else {
    if (a & 1) {
      printf("a");
      prev = 'a';
      a--;
      while (a) {
        printf("ba");
        prev = 'a';
        a -= 2;
      }
    } else {
      while (a) {
        printf("ab");
        prev = 'b';
        a -= 2;
      }
    }
    char i = 'b';
    while (b > 0) {
      i++;
      printf("%c", i);
      b--;
    }
  }
  printf("\n");
  return 0;
}
