Time limit
2s
Memory limit
128 MB
A dictionary contains every string made of exactly N letters a and M letters z, sorted in lexicographic order. Equal letters are indistinguishable, and no other letters appear.
Given N, M, and K, find the K-th string in this dictionary.
The first line contains three integers N, M, and K in that order.
Print the K-th string in the dictionary on the first line. If the dictionary contains fewer than K strings, print -1.