An organic compound \(P\) of molecular formula \( \mathrm{C_6H_{12}O_3} \) gives positive iodoform test but negative Tollens’ test. When \(P\) is treated with dilute acid, it produces \(Q\). \(Q\) gives positive Tollens’ test and also iodoform test. Identify compound \(P\).