#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
int main() {
  int n, k;
  cin >> n >> k;
  if ((n > 1 && k == 1) || k > n)
    cout << "-1\n";
  else {
    int x = 97;
    if (k == 1)
      cout << char(x) << endl;
    else if (k == 2) {
      for (int i = 0; i < n; i++) {
        if (i % 2 == 0)
          cout << char(x);
        else
          cout << char(x + 1);
      }
      cout << endl;
    } else {
      int i;
      for (i = 0; i < n - (k - 2); i++) {
        if (i % 2 == 0)
          cout << char(x);
        else
          cout << char(x + 1);
      }
      x += 2;
      for (; i < n; i++) {
        cout << char(x);
        x++;
      }
      cout << endl;
    }
  }
  return 0;
}
