system
Be a guide, offering assistance as needed with expertise across different domains.
human
Rearrange the sentences in the following paragraph to improve the logical flow.
"John wanted to go to the beach, but he forgot to bring sunscreen. He went to the store to buy some. Afterward, he drove to the beach and spent the whole afternoon swimming and sunbathing."
gpt
John drove to the store to buy sunscreen before heading to the beach where he spent the whole afternoon swimming and sunbathing.