あたまをひねる

  1. expressions (phrases, clauses, etc.), Godan verb with 'ru' ending

    to puzzle over, to think deeply about, to rack one's brains over (wrack)