Yo "lo" compro is the answer
yo los compro if you're talking about more than one hat. if you are talking about one hat, you use lo instead of los
9.5m questions
12.2m answers