The present invention relates to a compound represented by the formula wherein ring A is a nitrogen-containing heterocycle; ring B is an aromatic ring optionally having substituent(s); ring D is an aromatic ring optionally having substituent(s); L is a group represented by the formula R 2 , R 3 , R 4a and R 4b are each independently a hydrogen atom, an optionally halogenated C 1-6 alkyl group or an optionally halogenated C 3-6 cycloalkyl group, or R 2 and R 3 are optionally bonded via an alkylene chain or an alkenylene chain, or R 4a and R 4b are optionally bonded via an alkylene chain or an alkenylene chain; R 1 is a hydrogen atom or a substituent; m and n are each independently an integer of 0 to 5; m+n is an integer of 2 to 5; and - - - is a single bond or double bond, or a salt thereof; and the like. The compound has a superior tachykinin receptor antagonistic action, and is useful as an agent for the prophylaxis or treatment of various diseases such as lower urinary tract diseases, digestive tract diseases, central neurological disease and the like.