#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, i, j;
  int a, b, c, d, e, f;
  bool check = true;
  while (scanf("%d%d", &n, &k) == 2) {
    if (k > n)
      printf("-1\n");
    else if (n == k && k > 26)
      printf("-1\n");
    else if (k == 1) {
      if (n > k)
        printf("-1\n");
      else
        printf("a\n");
    } else if (k == 2) {
      b = n % 2;
      for (i = 1; i <= n / 2; i++) printf("ab");
      if (b > 0) printf("a");
      printf("\n");
    } else {
      d = k - 2;
      a = n - d;
      for (i = 1; i <= (a / 2); i++) printf("ab");
      if (a % 2 == 1) printf("a");
      for (i = 0; i < d; i++) printf("%c", 'c' + i);
      printf("\n");
    }
  }
  return 0;
}
