It’s Mg! Even if it’s not the first letter after a period, when you use chemical symbols it always is capitalized.