Three liquids are at temperatures of 10 degrees C, 20 degree C, and 30 degrees C, respectively. Equal masses of the first two liquids are mixed, and the equilibrium temperature is 17 degrees C. Equal masses of the second and third are then mixed, and the equilibrium temperature is 28 degrees C. Find the equilibrium temperature when equal masses of the first and third are mixed.