#include <bits/stdc++.h>
using namespace std;
int n, m;
int main() {
  scanf("%d%d", &n, &m);
  if (m > n || (n > 1 && m == 1)) {
    printf("-1");
    exit(0);
  }
  if (n == 1) {
    printf("a");
    exit(0);
  }
  for (int i = (1); i <= (n - (m - 2)); i++)
    if (i % 2 == 0)
      printf("b");
    else
      printf("a");
  for (int i = (3); i <= (m); i++) printf("%c", char('a' + i - 1));
}
