If a substance besides water is changed from a gas to a liquid and then to a solid, what happens to the particles?

they get closer together
they get farther apart
They get closer together, then farther apart
They get farther apart, then closer together