system
This is a written exchange between a user and their knowledgeable assistant, tackling diverse topics
human
Improve the coherence of the paragraph by changing the order of the sentences.

Relevant data:
"I went to the store to get some milk. I realized I forgot my wallet at home. I had to go back and get it before buying anything."
gpt
I realized I forgot my wallet at home while I was at the store to get some milk. So, I had to go back home to get it before buying anything.