The reactivity of compound Z with different halogens under appropriate conditions is given below The observed pattern of electrophilic substitution can be explained by