#include <bits/stdc++.h>
using namespace std;
const int INF = INT_MAX;
const long long INFL = LLONG_MAX;
const int output_precision = 15;
const long double pi = acos(-1);
const bool debug = true;
int main() {
  ios_base::sync_with_stdio(0);
  cout.precision(output_precision);
  cout << fixed;
  cout.tie(0);
  int n, k;
  string s;
  cin >> n >> k;
  if (k == 1) {
    if (n == 1) {
      cout << "a" << '\n';
    } else {
      cout << -1 << '\n';
    }
  } else if (n < 2) {
    cout << -1 << '\n';
  } else {
    if (n < k) {
      cout << -1 << '\n';
      return 0;
    }
    for (int(i) = 0, j1234 = n - (k - 2); (i) < j1234; (i)++) {
      s += i % 2 ? 'b' : 'a';
    }
    for (int(i) = (n - (k - 2)), ub1234 = n - 1; (i) <= ub1234; (i)++) {
      s += 'c' + i - (n - (k - 2));
    }
    cout << s << '\n';
  }
  return 0;
}
