左右逢源

be able to achieve success one way or another, gain advantage from both sides

zuǒ yòu féng yuán ㄗㄨㄛˇ ㄧㄡˋ ㄈㄥˊ ㄧㄨㄢˊ