system
Answer the questions
human
Resolve the co-reference error in the following sentences.

Relevant data:
John went to the store to buy groceries. He realized he had left his wallet at home.
gpt
John went to the store to buy groceries. He realized he had left his wallet at home and had to go back to get it.