あたまがわるい (-i inflection, romaji atama ga warui)
From 頭 (あたま, atama; “head”) and が (ga; indicates the subject of a sentence) and 悪い (わるい, warui; “bad”).