cho.sh
Notes
Loading...

Non-Repeating Word

Time limit

2s

Memory limit

128 MB

Problem

A positive integer K is given. A string S is called K-repeat-free if there is no nonempty string T such that T repeated K consecutive times appears as a substring of S.

Given K, N, and A, find the lexicographically smallest word of length N that is K-repeat-free and uses only the first A uppercase English letters.

Input

The first line contains three integers K, N, and A.

Output

Print the required word. If no such word exists, print -1.

Constraints

  • 2 <= K <= 10
  • 1 <= N <= 50
  • 1 <= A <= 26