#include <bits/stdc++.h>
using namespace std;
const long long int N = 100005;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  {
    long long int i, j, k, n, m, ans = 0, cnt = 0, sum = 0;
    string s, t;
    cin >> n >> k;
    if (k > n || (k == 1 && n > 1)) {
      cout << "-1";
      return 0;
    }
    t = "abcdefghijklmnopqrstuvwxyz";
    m = k - 2;
    j = 2;
    while (m > 0) {
      s += t[j];
      j++;
      m--;
    }
    reverse((s).begin(), (s).end());
    n -= max((long long int)0, (k - 2));
    if (n % 2 != 0) {
      j = 0;
      while (n > 0) {
        if (j % 2 == 0) {
          s += 'a';
        } else {
          s += 'b';
        }
        j++;
        n--;
      }
    } else {
      j = 0;
      while (n > 0) {
        if (j % 2 != 0) {
          s += 'a';
        } else {
          s += 'b';
        }
        j++;
        n--;
      }
    }
    reverse((s).begin(), (s).end());
    cout << s;
  }
}
