Two bodies of masses m1 and m2 are connected by a light, inextensible string, which passes over a frictionless pulley. If the pulley is moving upward with uniform acceleration g, then the tension in the string is