#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  char ch = 'a';
  if (n == 1 && m == 1)
    cout << ch;
  else if (n < m || m == 1)
    cout << -1;
  else {
    for (int i = 0; i < n - m + 2; ++i)
      if (i & 1) {
        cout << ch;
        --ch;
      } else {
        cout << ch;
        ++ch;
      }
    ch = 'c';
    for (int i = 0; i < m - 2; ++i, ++ch) cout << ch;
  }
  return 0;
}
