Which sequence represents heat being removed from matter?

A. solid→gas→liquid
B. Gas→solid→liquid
C. Gas→liquid→solid