The compound of the formula (III), wherein X1 is a hydrogen atom, a halogen atom, a lower alkyl group or a lower alkoxy group (=Z1) and Y1 is --SO2 Cl, that is, the compound of the formula: ##STR39## wherein Z1, R13 and m are as defined above, can be produced by reacting a compound of the formula: ##STR40## wherein Z1, R13 and m are as defined above with a diazotizing agent in the presence of a ba