#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int M = 110;
const int mod = 1e9 + 7;
const double eps = 1e-8;
const double Pi = 2 * acos(0.0);
inline int max(int a, int b) { return a > b ? a : b; }
inline int min(int a, int b) { return a < b ? a : b; }
inline int bit(int x) { return 1 << x; }
inline int abs(int x) { return x > 0 ? x : (-x); }
int a, b;
int main() {
  cin >> a >> b;
  if (b > a || b > 26 || (b == 1 && a > 1))
    cout << -1;
  else {
    int t = a - b;
    if (t % 2 == 0) {
      for (int i = 0; i < t; i += 2) {
        cout << "ab";
      }
      for (int i = 0; i < b; i++) {
        putchar('a' + i);
      }
    } else {
      for (int i = 0; i < t / 2; i++) {
        cout << "ab";
      }
      if (b == 2)
        cout << "aba";
      else {
        printf("abac");
        for (int i = 3; i < b; i++) {
          putchar('a' + i);
        }
      }
    }
  }
  return 0;
}
