As shown in the figure, two masses 6 kg and 4 kg respectively are tied to the ends of a string which passes over a light frictionless pulley. Initially, the masses are at rest and are at the same horizontal level. Now, they are released. Find the distance travelled by their center of mass in 10 s.