#include <bits/stdc++.h>
using namespace std;
int mi = 10e9;
const int MMAX = 0x7fffffff;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string x = "cdefghijklmnopqrstuvwxyz";
  int i = 0;
  int n, k;
  cin >> n >> k;
  if (n < k || k == 1 && n > 1) {
    cout << -1;
    return 0;
  }
  string y = "";
  if (k >= 2)
    k -= 2;
  else
    k -= 1;
  int r = n - k;
  for (int q = 0; q < r; q++) {
    if (q % 2 == 0)
      y += "a";
    else
      y += "b";
  }
  for (int q = 0; q < k; q++) {
    y += x[q];
  }
  for (int q = 0; q < y.size(); q++) {
    if (y[q] == y[q + 1]) {
      cout << -1;
      return 0;
    }
  }
  cout << y;
  return 0;
}
