A compound represented by the formula: wherein R 1 is a C 1-6 alkyl group optionally substituted by 1 to 3 substituents selected from a C 6-14 aryl group optionally substituted by 1 to 3 substituents selected from (a) a halogen atom, (b) a cyano group, and (c) a C 1-6 alkoxy group optionally substituted by 1 to 3 halogen atoms a 5- or 6-membered monocyclic aromatic heterocyclic group optionally substituted by 1 to 3 substituents selected from (a) a halogen atom, (b) a cyano group, and (c) a C 1-6 alkoxy group optionally substituted by 1 to 3 halogen atoms, and a 3- to 8-membered monocyclic non-aromatic heterocyclic group optionally substituted by 1 to 3 substituents selected from (a) a halogen atom, (b) a cyano group, and (c) a C 1-6 alkoxy group optionally substituted by 1 to 3 halogen atoms; R 2 is a hydrogen atom or a C 1-6 alkyl group; R 3 is a 5- or 6-membered nitrogen-containing aromatic heterocyclic group optionally substituted by 1 to 3 halogen atoms; ring A is a piperidine ring having no substituent other than R 1, R 2 -O- and -C(=O)-ring B, or an oxa-9-azabicyclo[3.3.1]nonane ring having no substituent other than R 1, R 2 -O- and -C(=O)-ring B; and ring B is a 5- or 6-membered aromatic ring (X and Y are independently a carbon atom or a nitrogen atom) which is, in addition to R 3 and -C(=O)-ring A, optionally substituted by 1 to 3 substituents selected from a halogen atom, a C 1-6 alkyl group optionally substituted by 1 to 3 halogen atoms, a C 1-6 alkoxy group and a C 1-6 alkylenedioxy group, or a salt thereof. R 1 is a C 1-6 alkyl group optionally substituted by 1 to 3 substituents selected from a C 6-14 aryl group optionally substituted by 1 to 3 substituents selected from (a) a halogen atom, (b) a cyano group, and (c) a C 1-6 alkoxy group optionally substituted by 1 to 3 halogen atoms a 5- or 6-membered monocyclic aromatic heterocyclic group optionally substituted by 1 to 3 substituents selected from (a) a halogen atom, (b) a cyano group, and (c) a C 1-6 alkoxy group optionally substituted by 1 to 3 halogen atoms, and a 3- to 8-membered monocyclic non-aromatic heterocyclic group optionally substituted by 1 to 3 substituents selected from (a) a halogen atom, (b) a cyano group, and (c) a C 1-6 alkoxy group optionally substituted by 1 to 3 halogen atoms; a C 6-14 aryl group optionally substituted by 1 to 3 substituents selected from (a) a halogen atom, (b) a cyano group, and (c) a C 1-6 alkoxy group optionally substituted by 1 to 3 halogen atoms (a) a halogen atom, (b) a cyano group, and (c) a C 1-6 alkoxy group optionally substituted by 1 to 3 halogen atoms a 5- or 6-membered monocyclic aromatic heterocyclic group optionally substituted by 1 to 3 substituents selected from (a) a halogen atom, (b) a cyano group, and (c) a C 1-6 alkoxy group optionally substituted by 1 to 3 halogen atoms, and (a) a halogen atom, (b) a cyano group, and (c) a C 1-6 alkoxy group optionally substituted by 1 to 3 halogen atoms, and a 3- to 8-membered monocyclic non-aromatic heterocyclic group optionally substituted by 1 to 3 substituents selected from (a) a halogen atom, (b) a cyano group, and (c) a C 1-6 alkoxy group optionally substituted by 1 to 3 halogen atoms; (a) a halogen atom, (b) a cyano group, and (c) a C 1-6 alkoxy group optionally substituted by 1 to 3 halogen atoms; R 2 is a hydrogen atom or a C 1-6 alkyl group; R 3 is a 5- or 6-membered nitrogen-containing aromatic heterocyclic group optionally substituted by 1 to 3 halogen atoms; ring A is a piperidine ring having no substituent other than R 1, R 2 -O- and -C(=O)-ring B, or an oxa-9-azabicyclo[3.3.1]nonane ring having no substituent other than R 1, R 2 -O- and -C(=O)-ring B; and ring B is a 5- or 6-membered aromatic ring (X and Y are independently a carbon atom or a nitrogen atom) which is, in addition to R 3 and -C(=O)-ring A, optionally substituted by 1 to 3 substituents selected from a halogen atom, a C 1-6 alkyl group optionally substituted by 1 to 3 halogen atoms, a C 1-6 alkoxy group and a C 1-6 alkylenedioxy group, a halogen atom, a C 1-6 alkyl group optionally substituted by 1 to 3 halogen atoms, a C 1-6 alkoxy group and a C 1-6 alkylenedioxy group, or a salt thereof.