Sentence:  At the end of the half-hour , racking his <WSD>brains</WSD> , thinking over and over again of Kitti , her friends , her past , he left the bedroom . 
Meaning of the word marked with <WSD> tags:  mental ability