Two blocks A and B of masses 2m and m, respectively are connected by a massless and inextensible string. The whole system is suspended by a massless spring as shown in the figure. The magnitude of acceleration of A and B immediately after the string is cut, are respectively: