A solution containing one mole per litre each of $Cu(NO_3)_2,AgNO_3,Hg_2(NO_3)_2$ is being electrolysed by using inert electrodes.The values of standard potentials are $E^{\large\circ}_{Ag^+|Ag}=0.80V,E^{\large\circ}_{Hg_2^{2+}|Hg}=0.79V,E^{\large\circ}_{Cu^{2+}|Cu}=0.34V,E^{\large\circ}_{Mg^{2+}|Mg}=-2.3V$ with increasing voltage,the sequence of deposition of metals on the cathode will be