($n,$k)=glob<>;s/./$&x$k/ge,print for<>