kǔ​sī​míng​xiǎng

to rack one's brains