As the density, temperature and/or rigidity of a medium increases, the speed of sound through the medium increases or decreases?

The speed of sound through a medium increases as the temperature and rigidity of the medium increase, but decreases as the density of the medium increases.