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