#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, k, sum = 0, ans = 0, tem1, tem2, tem3;
  string s = "", c;
  cin >> n >> k;
  if ((k == 1 && n > 1) || k > n) {
    cout << -1;
    return 0;
  }
  k--;
  for (int i = 0; i < n; i++) {
    if (i % 2 == 0)
      s += 'a';
    else
      s += 'b';
  }
  if (k == 1) {
    cout << s;
    return 0;
  }
  for (int i = n - 1; i >= 0 && k > 1; i--) {
    s[i] = 'a' + k;
    k--;
  }
  cout << s;
  return 0;
}
