#include <bits/stdc++.h>
using namespace std;
int compare(const void* a, const void* b) { return (*(int*)a - *(int*)b); }
int main() {
  int n, k, j = -1;
  char symb = 'a';
  cin >> n >> k;
  if (n < k || k > 26 || (n > 1 && k == 1))
    cout << -1;
  else if (n == k) {
    symb = -1;
    for (int i = 0; i < n; i++) {
      j++;
      symb = j + 97;
      cout << symb;
      if (j >= 26) j = -1;
    }
  } else {
    k -= 2;
    symb = 'a';
    for (int i = 0; i < n - k; i++) {
      cout << symb;
      if (symb == 'a')
        symb = 'b';
      else
        symb = 'a';
    }
    j = 1;
    for (int i = 0; i < k; i++) {
      j++;
      symb = j + 97;
      cout << symb;
      if (j >= 26) j = 1;
    }
  }
  return 0;
}
