頭を捻る (あたまをひねる) — to puzzle over | Kumi Dictionary