#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  if (k == 1)
    if (n == 1)
      cout << "a" << endl;
    else
      cout << -1 << endl;
  else if (k > n)
    cout << -1 << endl;
  else {
    int h = n - (k - 2);
    for (int i = 0; i < h; i++)
      if (i % 2 == 0)
        cout << 'a';
      else
        cout << 'b';
    for (int i = 0; i < k - 2; i++) cout << char('c' + i);
    cout << endl;
  }
}
