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