#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n, k;
  string s, s1 = "abcdefghijklmnopqrstuvwxyz";
  cin >> n >> k;
  if (k > n || (k == 1 and n > 1))
    cout << -1;
  else if (n == k)
    for (int i = 0; i < k; i++) cout << s1[i];
  else {
    for (int d = 1; d <= n - (k - 2); d++) cout << (d % 2 ? 'a' : 'b');
    for (int i = 2; i < k; i++) cout << s1[i];
  }
  return 0;
}
