îi trece prin cap

Etymology
lit. 'pass through one’s head'.

Verb

 * 1) to cross someone's mind