#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long long int n, i;
  int k;
  char letter = 'a';
  string out = "";
  cin >> n >> k;
  if (n < k)
    cout << "-1";
  else {
    if (k == 1) {
      if (n == 1)
        out += letter;
      else
        out += "-1";
    } else {
      for (i = 0; i < n; i++) {
        out += letter;
        if (i % 2 == 0)
          letter++;
        else
          letter--;
      }
      letter = 'a' + k - 1;
      for (i = n - 1; i >= n - 1 - k + 3; i--) {
        out[i] = letter;
        letter--;
      }
    }
    cout << out;
  }
  cout << "\n";
  return 0;
}
