Choose a sequence:
When Mary and John went to the shops, John gave a drink to Mary.
When Mary and John went to the shops, Mary gave a drink to John.