#P1267L. Lexicography

    ID: 3879 Type: RemoteJudge 3000ms 512MiB Tried: 0 Accepted: 0 Difficulty: 6 Uploaded By: Tags>constructive algorithmsstrings*1800

Lexicography

Description

Lucy likes letters. She studied the definition of the lexicographical order at school and plays with it.

At first, she tried to construct the lexicographically smallest word out of given letters. It was so easy! Then she tried to build multiple words and minimize one of them. This was much harder!

Formally, Lucy wants to make nn words of length ll each out of the given nln \cdot l letters, so that the kk-th of them in the lexicographic order is lexicographically as small as possible.

The first line contains three integers nn, ll, and kk (1kn10001\le k \le n \le 1\,000; 1l10001 \le l \le 1\,000) — the total number of words, the length of each word, and the index of the word Lucy wants to minimize.

The next line contains a string of nln \cdot l lowercase letters of the English alphabet.

Output nn words of ll letters each, one per line, using the letters from the input. Words must be sorted in the lexicographic order, and the kk-th of them must be lexicographically as small as possible. If there are multiple answers with the smallest kk-th word, output any of them.

Input

The first line contains three integers nn, ll, and kk (1kn10001\le k \le n \le 1\,000; 1l10001 \le l \le 1\,000) — the total number of words, the length of each word, and the index of the word Lucy wants to minimize.

The next line contains a string of nln \cdot l lowercase letters of the English alphabet.

Output

Output nn words of ll letters each, one per line, using the letters from the input. Words must be sorted in the lexicographic order, and the kk-th of them must be lexicographically as small as possible. If there are multiple answers with the smallest kk-th word, output any of them.

Sample Input 1

3 2 2
abcdef

Sample Output 1

af
bc
ed

Sample Input 2

2 3 1
abcabc

Sample Output 2

aab
bcc