main=f['0'..];f l=do c<-getChar;putStr$show$length$fst$span(/=c)l;f$c:filter(/=c)l