Durning which process does water gain the most heat energy?