You are given a sentence and a question in the input. The information provided in the sentence should be enough to answer the question. You're expected to write the correct answer. Do not use any facts other than those provided in the sentence.
Q: Sentence: John waved to Mary and brought her a flower. 
Question: How did Mary know John was a nice man?
A:

Show your work and conclude with the exact phrasing "Therefore, the final answer is [answer]." where [answer] is just the final number or expression that solves the problem.
user
He brought her a flower.