#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  if (n < k || (n > 1 && k == 1)) {
    printf("-1\n");
  } else if (n == 1 && k == 1) {
    printf("a\n");
  } else {
    int remain = n - (k - 2);
    int cycle = remain / 2;
    for (int i = 0; i < cycle; i++) {
      printf("ab");
    }
    if (cycle * 2 != remain) {
      printf("a");
    }
    for (int i = 2; i < k; i++) {
      printf("%c", i + 'a');
    }
    printf("\n");
  }
  return 0;
}
