In which sentence are all pronouns used as objects of a preposition used correctly?

A.
My cousin gave advice to we.

B.
We walked quickly beside they.

C.
Will you swim to the pier with we?

D.
Tony boarded the train with him.