All the surfaces shown in the figure are frictionless. The mass of the inclined wedge is M, that of the block is m and spring constant of the spring is k. Initially, the block and wedge are at rest. The spring is stretched by a small length and then released. Find the time period of oscillation of the system.