They can escape by helping each other

like b can help A as b 's hand free and if he can help to A then A can easily rescue then B can help A and then A and B can help C