A block of mass m moving with a velocity v0 collides with a stationary block of mass M to which a spring of stiffness k is attached