#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  if (n == 1 && m == 1) {
    cout << 'a';
    return 0;
  }
  if (m > n) {
    cout << -1;
    return 0;
  } else if (m == 1 && n > 1) {
    cout << -1;
    return 0;
  } else {
    for (int i = 0; i < n - m + 2; i += 1) {
      if (i % 2 == 0) {
        cout << 'a';
      } else {
        cout << 'b';
      }
    }
    for (int i = 3; i <= m; i += 1) {
      char f = 96 + i;
      cout << f;
    }
  }
}
