#include <bits/stdc++.h>
using namespace std;
using lli = int64_t;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int T = 1;
  for (int t = 1; t <= T; t++) {
    int n, k;
    cin >> n >> k;
    if (n == 1 and k == 1) {
      cout << 'a';
      return 0;
    }
    if (n < k or (n >= 2 and k == 1)) {
      cout << -1 << "\n";
    } else {
      string dist = "";
      for (int i = 0; i < k - 2; i++) {
        dist += ('c' + i);
      }
      for (int i = 0; i < n - (k - 2); i++) {
        cout << ((i & 1) == 0 ? 'a' : 'b');
      }
      cout << dist;
    }
  }
}
