#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
const int mod = 1000000007;
const double pi = (double)22 / 7;
int main() {
  cin.tie(0);
  std::ios::sync_with_stdio(false);
  int n, k;
  cin >> n >> k;
  if (k > n || (k == 1 && n != 1)) return cout << -1, 0;
  string ans = "";
  n -= k;
  bool flag = 0;
  while (n > 0) {
    if (n > 1) {
      cout << "ab";
      n -= 2;
    } else {
      cout << 'a';
      n--;
      flag = 1;
    }
  }
  if (flag) {
    if (k > 1) {
      ans += "ba";
      k -= 2;
      int c = 2;
      for (int i = 0; i < k; i++, c++) ans += char('a' + c);
    } else {
      ans += 'a';
      k--;
    }
  } else {
    for (int i = 0; i < k; i++) ans += char('a' + i);
  }
  cout << ans;
}
