I'll give you a question, please answer with step-by-step reasoning process.
In 2013, Madison began playing Hillary on the TV sitcom Trophy Wife, replacing Gianna LePera who played the character in the pilot. In 2014, she began playing the recurring role of Sophia Quinn in the ABC Family drama The Fosters. In 2015, she began playing Grace Russell, the daughter of Cassie Nightingale, in the Hallmark series Good Witch.\n\nAnswer this question: what role does bailee madison play in the fosters?

Sophia Quinn
The relevant information is: In 2014, she began playing the recurring role of Sophia Quinn in the ABC Family drama The Fosters.

.

The final answer: Sophia Quinn