#include <bits/stdc++.h>
using namespace std;
inline long long pw(long long a, long long b) {
  return (b) ? (pw((a) * (a), (b) >> 1) * ((b)&1 ? (a) : 1)) : 1;
}
const int MAXN = 2e5 + 5;
const long long INF = 1e10;
const int MOD = 1e9 + 7;
string ans;
int main() {
  int n, k;
  cin >> n >> k;
  if (k > n || (k == 1 && n != 1)) return cout << -1, 0;
  if (k == 1 && n == 1) return cout << "a", 0;
  k -= 2;
  for (int i = 0; i < n - k; i++) ans += (i % 2 == 0 ? 'a' : 'b');
  for (int i = 0; i < k; i++) ans += (char)(99 + i);
  cout << ans;
}
