#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, i = 0;
  char c = 'c';
  cin >> n >> k;
  if (k > n || (k == 1 && n > 1) || n + k == 2) {
    n + k == 2 ? cout << 'a' : cout << "-1";
    return 0;
  }
  k -= 2;
  n -= k;
  while (n--) {
    cout << (i % 2 == 0 ? 'a' : 'b');
    i++;
  }
  while (k--) cout << c++;
}
