Sentence: The dog chased the cat, which ran up a tree. It waited at the bottom.
 Reason: The 'It' refers to the dog because the top seems to be referring to the tree which the cat ran up. 
 Question: Is the above reasoning correct or wrong? 