#include <bits/stdc++.h>
using namespace std;
char str[1000005];
int main() {
  int i, j, k, l, n, m;
  while (scanf("%d%d", &n, &m) != EOF) {
    if (m > n || (n >= 2 && m == 1))
      puts("-1");
    else {
      for (i = 0; i < n - (m - 2); i = i + 2)
        for (j = 0; j < 2; j++) str[i + j] = 'a' + j;
      k = 2;
      for (i = n - (m - 2); i < n; i++) str[i] = 'a' + k++;
      str[n] = '\0';
      puts(str);
    }
  }
  return 0;
}
