#!perl -na map{print$"x($s-=$z*length).($z?reverse:$_),$/;$s+=($z^=1)*length}@F