绞尽脑汁

jiǎo jìn nǎo zhī

to rack one's brains

绞

jiǎo

to twist (strands into a thread)

尽

jìn

to use up

脑

nǎo

brain

汁

zhī

juice