Two blocks A and B of mass m and 2m respectively are connected by a massless spring of force constant k. They are placed on a smooth horizontal plane. They are stretched by an amount x and then released. The relative velocity of the blocks when the spring comes to its natural length is