jì​qióng

at one's wits' end