How the direction of heat flow could be established by measuring the temperature before and after the changes?