#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000010;
int N, K;
char ans[MAXN];
int main() {
  while (scanf("%d%d", &N, &K) != EOF) {
    if (K == 1) {
      if (N > 1) {
        puts("-1");
        continue;
      }
      for (int i = 1; i <= N; i++) putchar('a');
      puts("");
      continue;
    } else {
      if (N < K) {
        puts("-1");
        continue;
      }
      int op = 0;
      for (int i = 1; i <= N; i++) {
        if (op == 0)
          ans[i] = 'a';
        else
          ans[i] = 'b';
        op ^= 1;
      }
      int last = K - 1;
      for (int i = N; i >= 0 && last > 1; i--, last--) ans[i] = last + 'a';
      for (int i = 1; i <= N; i++) printf("%c", ans[i]);
      puts("");
    }
  }
  return 0;
}
