A compound of formula (1):wherein R1 and R2 represent hydrogen, lower alkyl, lower alkenyl, lower alkynyl orR3 represents hydroxyl, lower alkoxy, lower cycloalkyloxy, aryloxy, carboxy, lower alkoxycarbonyl, or NRaRb of the formulaR4 and R5 represent halogen, lower alkyl, hydroxyl, or lower alkoxy; R6 represents halogen, lower alkyl, aryl, heterocyclic, hydroxy, lower alkoxy, mercapto, lower alkylthio, lower alkylcarbonyl, amino, nitro or cyano; R7 represents lower alkyl, hydroxyl or lower alkoxy; Ra and Rb represent hydrogen or lower alkyl; ring A represents a cyclic hydrocarbon or a heterocyclic ring; ring B represents a heterocyclic ring; X represents lower alkylene; Z represents a single bond or lower alkylene; Y represents lower alkylene and W1—W2 represents CH—CH, or Y represents a single bond and W1—W2 represents N—CH, CH—N or CH—CH; and 1, m, n and o represent 0, 1, 2, or 3.