挖空心思

wā kōng xīn si

to dig for thoughts (idiom); to search everything for an answer

to rack one's brains

to dig

kōng

empty

xīn

heart

si

to think