When magnesium reacts with oxygen,nature of bond formed is?