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