Which word in the sentence is the direct object?

I brushed the horses at the stable all afternoon.

A.
I

B.
horses

C.
afternoon

D.
brushed