The reactions proceed by refluxing under heating in a suitable solvent, for example, an alcohol solvent such as methanol, ethanol or propanol, or inert solvent such as benzene or toluene for 5 to 20 hours to yield the compound of the formula (I) and the compound of the formula (IV).