Which sentence is written in the BEST possible way?*

A. When he walked yesterday, nailed to the gate, Mr. Smith saw a " Beware of Dog" sign.
B. Nailed to the gate when he walked yesterday, Mr. Smith saw a "Beware of Dog" sign.
C. When he walked yesterday, Mr. Smith saw a "Beware of Dog" sign nailed to the gate.
D. Mr. Smith saw a 'Beware of Dog' sign when he walked yesterday, nailed to the gate.