main=interact(1#) n#s|n<5^5=take n s++'\n':(n+1)#drop n[x|x<-s,' '