A bullet of mass 10 g moving horizontally with a speed of 500 m/s passes through a block of wood of mass 1 kg, initially at rest on a frictionless surface. The bullet comes out of the block with a speed of 200 m/s. What is the final speed of the block?