Codeforces Round 177 (Div. 2)
C
Polo the Penguin and Strings
Codeforces
未评级
原题
← BD →
翻译中…

Little penguin Polo adores strings. But most of all he adores strings of length $*n*$.

翻译中…

One day he wanted to find a string that meets the following conditions:

翻译中…
  1. The string consists of $*n*$ lowercase English letters (that is, the string's length equals $*n*$), exactly $*k*$ of these letters are distinct.
  2. No two neighbouring letters of a string coincide; that is, if we represent a string as $*s* = *s*_{1}*s*_{2}... *s*_{*n*}$, then the following inequality holds, $*s*_{*i*} ≠ *s*_{*i* + 1}(1 ≤ *i* < *n*)$.
  3. Among all strings that meet points 1 and 2, the required string is lexicographically smallest.
翻译中…

Help him find such string or state that such string doesn't exist.

翻译中…

String $*x* = *x*_{1}*x*_{2}... *x*_{*p*}$ is lexicographically less than string $*y* = *y*_{1}*y*_{2}... *y*_{*q*}$, if either $*p* < *q*$ and $*x*_{1} = *y*_{1}, *x*_{2} = *y*_{2}, ... , *x*_{*p*} = *y*_{*p*}$, or there is such number $*r*$ $(*r* < *p*, *r* < *q*)$, that $*x*_{1} = *y*_{1}, *x*_{2} = *y*_{2}, ... , *x*_{*r*} = *y*_{*r*}$ and $*x*_{*r* + 1} < *y*_{*r* + 1}$. The characters of the strings are compared by their ASCII codes.

翻译中…

Input

翻译中…

A single line contains two positive integers $*n*$ and $*k*$ $(1 ≤ *n* ≤ 10^{6}, 1 ≤ *k* ≤ 26)$ — the string's length and the number of distinct letters.

翻译中…

Output

翻译中…

In a single line print the required string. If there isn't such string, print "-1" (without the quotes).

翻译中…

样例

Input #1
7 4
Output #1
ababacd
InputCopy OutputCopy
Input #2
4 7
Output #2
-1
InputCopy OutputCopy
题目信息
题号
289C
时间限制
2 s
内存限制
256 MB

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。