#include <bits/stdc++.h>
const long long lim = 1e5 + 5;
using namespace std;
vector<long long> adj[1005];
double prob[lim];
bool vis[lim];
vector<long long> fact[2004];
long long dp[2004][2004];
bool prime[lim];
long long ans[lim], count = 1;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, k;
  cin >> n >> k;
  if (n == 1 && k == 1) {
    cout << 'a';
    return 0;
  }
  if (k > n || (k == 1 && n > 1)) {
    cout << "-1";
    return 0;
  };
  for (long long i = 0; i < n - (k - 2); i++)
    if (i % 2)
      cout << 'b';
    else
      cout << 'a';
  ;
  for (long long i = 0; i < k - 2; i++) {
    char d = 'c' + i;
    cout << d;
  }
}
