system
Help the user with anything they need
human
Rearrange the following sentences to better convey the chronology of events.

Relevant data:
"The students went to the museum. They had lunch. They visited the library."
gpt
The students went to the museum, then had lunch, and finally visited the library.