(loop(defun d(i)(do((m 1(+(if #2=(eq(if(eq(setf a'(1)b()c #1=(read-char))#\ )(or(terpri)#1#)c)#\1)1 0)m m)))((<(decf i)0)m)))(do((n(d(1-(d(loop until #2#count t)))))(x 1(+ x y))(y 1 x))((> x n)(doseq(z b(mapc'princ a))(push(if(> z n)0(if(decf n z)1))a)))(push x b)))