#include <bits/stdc++.h>
template <class T>
const T& min(const T& a, const T& b, const T& c) {
  return min(a, min(b, c));
}
template <class T>
const T& max(const T& a, const T& b, const T& c) {
  return max(a, max(b, c));
}
using namespace std;
int gcd(long long a, long long b) {
  while (true) {
    if (a < b) swap(a, b);
    if (b == 0) return a;
    a = a % b;
  }
}
int main() {
  int n, k;
  cin >> n >> k;
  if (k > n) {
    cout << "-1";
    return 0;
  }
  if (k == 1) {
    if (n == 1)
      cout << "a";
    else
      cout << "-1";
    return 0;
  }
  if (k == 2) {
    for (__typeof(n) i = 0; i < n; i++) {
      cout << (((i % 2) == 0) ? "a" : "b");
    }
    return 0;
  }
  int written = 0;
  for (__typeof(n - (k - 2)) i = 0; i < n - (k - 2); i++) {
    cout << (((i % 2) == 0) ? 'a' : 'b');
  }
  for (__typeof(k - 2) i = 0; i < k - 2; i++) {
    char c = 'c' + i;
    cout << c;
  }
}
template <class T>
string toStr(T t) {
  std::stringstream strstream;
  string resStr;
  strstream << t;
  strstream >> resStr;
  return resStr;
}
