#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  string a = "";
  if (k > n or (k == 1 and n != 1)) {
    cout << -1;
    return 0;
  }
  while (k > 2) {
    a += 'a' + k - 1;
    k--;
  }
  if ((n - a.size()) % 2) a += 'a';
  while (a.size() != n) {
    a += 'b';
    a += 'a';
  }
  reverse(a.begin(), a.end());
  cout << a;
}
