#include <bits/stdc++.h>
using namespace std;
string s;
int n, k;
int main() {
  char c = 'c';
  int i;
  cin >> n >> k;
  if (n == 1 && k == 1) {
    cout << 'a' << endl;
    return 0;
  }
  if (k > n || k == 1) {
    cout << -1 << endl;
    return 0;
  }
  for (i = 0; i <= n - k + 1; i++)
    if (i % 2 == 0)
      s += 'a';
    else
      s += 'b';
  for (i = n - k + 2; i < n; i++) {
    s += c;
    c++;
  }
  cout << s << endl;
  return 0;
}
