A violet compound of manganese 'A’ decomposes on heating to liberate oxygen

A violet compound of manganese 'A’ decomposes on heating to liberate oxygen and compounds B and C of manganese are formed. Compound C reacts with KOH in the presence of potassium nitrate to give a compound B. On heating compound C with cone. $H_{2}SO_{4}$ and NaCl, chlorine gas is liberated and compound D of manganese along with other products is formed. Identify compounds A to D and also explain the reactions involved.

Since, compound C on treating with cone. H_{2}SO_{4} and NaCl gives Cl_{2} gas, so it is manganese dioxide (MnO_{2}). It is obtained along with Mn04_ when KMnO_{4} (violet) is heated.
Thus,