s[];main(w){char*q,*p=s;for(scanf("%d ",&w);q=gets(p);puts(),p+=38)for(;q+=w,*q;*q++=10)for(;*--q-32;);}