shù​shǒu​wú​cè

at one's wit's end