Problem: A student, Kita_masa, is taking an English examination. In this examination, he has to write a sentence of length m.

Since he completely forgot the English grammar, he decided to consider all sentences of length m constructed by concatenating the words he knows and write the K-th sentence among the candidates sorted in lexicographic order. He believes that it must be the correct sentence because K is today's lucky number for him.

Each word may be used multiple times (or it's also fine not to use it at all) and the sentence does not contain any extra character between words. Two sentences are considered different if the order of the words are different even if the concatenation resulted in the same string.



Input

The first line contains three integers n (1 \leq n \leq 100), m (1 \leq m \leq 2000) and K (1 \leq K \leq 10^{18}), separated by a single space. Each of the following n lines contains a word that Kita_masa knows. The length of each word is between 1 and 200, inclusive, and the words contain only lowercase letters. You may assume all the words given are distinct.

Output

Print the K-th (1-based) sentence of length m in lexicographic order. If there is no such a sentence, print "-".

Examples

Input

2 10 2
hello
world


Output

helloworld


Input

3 3 6
a
aa
b


Output

aba


Input

2 59 1000000000000000000
a
b


Output

-

Solution (in CPP):

Solution:
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<iostream>
using namespace std;
char ch[110][210];
int pn[110];
char ans[2010];
long long num[2010];
int N,M;long long K;
int st['z'+1][110][210];
int tp['z'+1][110];
long long oo;
long long S[110][210];
int main()
{
    int i,j,k,o;oo=1;for(i=0;i<18;i++)oo*=10;oo+=1;
    scanf("%d%d%lld",&N,&M,&K);
    for(i=0;i<N;i++)
    {
        scanf("%s",ch[i]);
        pn[i]=strlen(ch[i]);
    }

    for(i=0;i<N;i++)
    {
        for(j=0;j<pn[i];j++)
        {
            st[ch[i][j]][i][tp[ch[i][j]][i]++]=j;
        }
    }

    num[0]=1;
    for(i=1;i<=M;i++)
    {
        for(j=0;j<N;j++)
        {
            if(i>=pn[j]) num[i]+=num[i-pn[j]];
            if(num[i]>oo) num[i]=oo;
        }
    }
    long long s=0;
    long long last=1;
    int t;
    for(i=0;i<M;i++)
    {
        for(j='a';j<='z';j++)
        {
            s=0;
            for(k=0;k<N;k++)
            {
                for(o=0;o<tp[j][k];o++)
                {
                    t=st[j][k][o];
                    if(t>0)
                    {
                        if(ch[k][t-1]==ans[i-1]&&M-i>=pn[k]-t)
                        {
                            //cout<<S[k][t-1]<<"   "<<num[M-i-(pn[k]-t)]<<endl;
                            if((double)S[k][t-1]*(double)(num[M-i-(pn[k]-t)])>(double)(oo+oo/10)) s=oo;
                            else
                            {
                                s+=S[k][t-1]*num[M-i-(pn[k]-t)];
                                if(s>oo) s=oo;
                            }
                        }
                    }
                    else
                    {
                        if(M-i>=pn[k]-t)
                        {
                            if((double)last*(double)(num[M-i-(pn[k]-t)])>(double)(oo+oo/10)) s=oo;
                            else
                            {
                                s+=last*num[M-i-(pn[k]-t)];
                                if(s>oo) s=oo;
                            }
                        }
                    }
                }
            }
            //cout<<s<<endl;
            if(K>s) K-=s;
            else break;
        }
       //cout<<K<<"  "<<ans[i]<<endl;
        if(j>'z')
        {
            printf("-\n");
            return 0;
        }
        ans[i]=j;
        for(k=0;k<N;k++)
        {
            for(o=pn[k]-1;o>0;o--)
            {
                if(i>0&&ch[k][o]==j&&ch[k][o-1]==ans[i-1])
                {
                    S[k][o]=S[k][o-1];
                }
                else S[k][o]=0;
            }
        }
        for(k=0;k<N;k++)
        {
            if(ch[k][0]==j) S[k][0]=last;
            else S[k][0]=0;
        }
        last=0;
        for(k=0;k<N;k++)
        {
            if(ch[k][pn[k]-1]==j)
            {
                last+=S[k][pn[k]-1];
                if(last>oo) last=oo;
            }
        }

    }
    ans[M]=0;
    printf("%s\n",ans);
    return 0;
}