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