wú​shǔ​jì​qióng

at one's wits' end