#include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 1000;
int n, m;
int main() {
  std::ios::sync_with_stdio(false);
  cin >> n >> m;
  if (n == 1 && m == 1) {
    cout << "a" << endl;
    return 0;
  }
  if (n < m || m == 1) {
    puts("-1");
    return 0;
  }
  int x = (n - (m - 2)) / 2;
  for (int i = 1; i <= x; i++) cout << "ab";
  if ((n - (m - 2)) % 2 == 1) cout << "a";
  for (int i = 1; i <= m - 2; i++) cout << char('c' + i - 1);
  cout << endl;
  return 0;
}
