Answer :

Percent composition by mass is calculated (mass of element within compound)/(mass of compound)*100. The lower the total molar mass of the compound, the greater the percent composition of sulfur. In this case, MgS would be that compound, since Mg has the lowest molar mass of the four elements bonded to S.
Mgs is the compound that has the greatest percent composition by mass of sulfur.