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