Three liquids are at temperatures of 12°C, 21°C, and 36°C, respectively. Equal masses of the first two liquids are mixed, and the equilibrium temperature is 15°C. Equal masses of the second and third are then mixed, and the equilibrium temperature is 26°C. Find the equilibrium temperature when equal masses of the first and third are mixed.