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