#include <bits/stdc++.h>
using namespace std;
int main() {
  long long T = 1;
  while (T--) {
    long long N, K;
    cin >> N >> K;
    if (N == 1 && K == 1) {
      cout << 'a' << endl;
      continue;
    }
    if (K > N || K == 1) {
      cout << -1 << endl;
      continue;
    }
    char ans[N];
    long long pos = N - 1;
    while (K > 2) {
      ans[pos] = (char)('a' + K - 1);
      K--;
      pos--;
    }
    for (long long i = 0; i <= pos; i++) {
      ans[i] = ((i % 2 == 0) ? ('a') : ('b'));
    }
    for (long long i = 0; i < N; i++) {
      cout << ans[i];
    }
    cout << endl;
  }
  return 0;
}
