思案投首(しあんなげくび)

Japanese vocabulary

Meaning: being at one's wit's end; being (quite) at a loss (what to do)

See it used in real works