#include <bits/stdc++.h>
using namespace std;
string s;
bool u[200];
int main() {
  long long n, k;
  cin >> n >> k;
  if (k > n)
    cout << -1 << endl;
  else if (k == 1 && n > 1)
    cout << -1 << endl;
  else {
    s = "";
    memset(u, 0, sizeof u);
    for (int i = 0; i < n; i++) {
      if (i == 0) {
        s += 'a';
        u[0] = 1;
      } else {
        for (int j = 0; j < 26; j++)
          if (s[i - 1] - 'a' != j) {
            s += 'a' + j;
            u[j] = 1;
            j = 27;
          }
      }
    }
    long long c = 0;
    for (int i = 0; i < 200; i++)
      if (u[i]) c++;
    long long d = k - c;
    for (int i = s.length() - d; i < s.length(); i++) {
      for (int j = 0; j < 26; j++)
        if (!u[j]) {
          s[i] = 'a' + j;
          u[j] = 1;
          j = 27;
        }
    }
    cout << s << endl;
  }
  return 0;
}
