#include <bits/stdc++.h>
using namespace std;
char Ar[100005];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  if (n == 1 && m == 1) {
    printf("a");
    return 0;
  }
  if (n < m || m == 1) {
    cout << "-1";
    return 0;
  }
  int i, j, p, q;
  p = m - 2;
  q = n - p;
  char k = 'a';
  j = 0;
  while (j < q) {
    if (q - j >= 2) {
      printf("ab");
      j = j + 2;
    } else {
      printf("a");
      j++;
    }
  }
  for (j = 0; j < p; j++) printf("%c", k + j + 2);
  return 0;
}
