Answer:
mercury, magnesium, water and gasoline.
Step-by-step explanation:
Density: 
Density is equal to the mass of substance divided by its volume. 
Units: 
SI unit of density is Kg/m3. 
Other units are given below, 
g/cm3, g/mL , kg/L 
The liquid with higher density will sink in bottom while the liquid with lower density will float.
In given samples,
density of water = 1 g/mL
density of mercury = 13.6 g/mL
density of gasoline = 0.70 g/mL
density of magnesium = 1.7 g/mL
So on the basis of given density values mercury will sink in bottom then above it magnesium will present than water and above on these three gasoline will present.