cho.sh
Notes
Loading...

Dictionary

Time limit

2s

Memory limit

128 MB

Problem

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.

Input

The first line contains three integers N, M, and K in that order.

Output

Print the K-th string in the dictionary on the first line. If the dictionary contains fewer than K strings, print -1.

Constraints

  • 1 <= N, M <= 100
  • 1 <= K <= 1,000,000,000