s=System.in.text s.each{s=s.replaceAll(/^ * |(\S)(\W{50}) /,' $2$1')}print s