P represents heating and Q represent cooling. this is because when you start from a liquid and turn to a gas the particles move faster making them farther apart, causing a gas. the opposite happens when you go from a liquid to a solid. the partials move closer together causing a solid to form. :)