山穷水尽

at one's wits' end, at the end of one's resources, at the end of one's rope, at the end of one's row, at the end of one's tether

shān qióng shuǐ jìn ㄕㄢ ㄑㄩㄥˊ ㄕㄨㄟˇ ㄐㄧㄣˋ