strcmp();s[999][9];i;main(k,t){for(;gets(s+i)?qsort(s,i++,36,strcmp):strlen(t=++k%i+s)-k/i?k<<19:puts(t););}