The electronic configuration of four elements L, P, Q and R are given in brackets (1s2,2s22p4);Q(1s2,2s22p6,3s23p5),p(1s2,2s22p6,3s1);R(1s22s62p6,3s2). The formulae of ionic compounds that can be formed between these elements are
L = oxygen; Q = Chlorine; P = Sodium; R = Magnesium