#include <bits/stdc++.h>
using namespace std;
int n, k;
char res[1000010];
int main() {
  scanf("%d %d", &n, &k);
  if (n < k) {
    puts("-1");
    return 0;
  }
  if (k == 1) {
    if (n == 1)
      puts("a");
    else
      puts("-1");
    return 0;
  }
  int p = 0;
  while (n > k + 1) {
    res[p++] = 'a';
    res[p++] = 'b';
    n -= 2;
  }
  if (n == k + 1) {
    res[p++] = 'a';
    res[p++] = 'b';
    res[p++] = 'a';
    for (int i = 2; i < k; i++) res[p++] = 'a' + i;
    puts(res);
    return 0;
  }
  assert(n == k);
  for (int i = 0; i < k; i++) res[p++] = 'a' + i;
  puts(res);
  return 0;
}
