#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  while (~scanf("%d %d", &n, &k)) {
    if (k == 1 && n == 1) {
      printf("a\n");
      continue;
    }
    if ((k > n) || (k == 1 && n != 1)) {
      printf("-1\n");
      continue;
    } else {
      for (int i = 0; i < n - (k - 2); i++) {
        if (i % 2 != 0) {
          cout << "b";
        } else {
          cout << "a";
        }
      }
      for (int i = 0; i < k - 2; i++) {
        printf("%c", 'c' + i);
      }
      printf("\n");
    }
  }
  return 0;
}
