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