#include <bits/stdc++.h>
const int mod = 1e9 + 7;
const int INF = 1e9;
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  int n, k;
  cin >> n >> k;
  if (n < k || (k == 1 && n != 1))
    cout << -1 << endl;
  else if (n == 1 && k == 1) {
    cout << 'a';
  } else {
    int rem = k - 2;
    int len = n - rem;
    int count = len / 2;
    int dif = len % 2;
    string rep = "ab";
    for (int i = 0; i < count; i++) {
      cout << rep;
    }
    cout << rep.substr(0, dif);
    for (int i = 0; i < rem; i++) {
      cout << char('c' + i);
    }
    cout << endl;
  }
  return 0;
}
