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