随遇而安

be able to adapt oneself to different circumstances, make the best of things

suí yù ér ān ㄙㄨㄟˊ ㄧㄩˋ ㄦˊ ㄢ