Tension in system of masses tied by strings