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