Compounds represented by formula (I) and pharmaceutically acceptable salts thereof have excellent sodium channel inhibitory action and are useful as therapeutic agents and analgesics for various kinds of neuralgia, neuropathy, epilepsy, insomnia, premature ejaculation and the like.wherein Q represents ethylene, etc., R1, R2 and R3 represent hydrogen, etc., X1 represents C1-6 alkylene, etc., X2 represents C1-6 alkylene, etc., A1 represents a 5- to 6-membered heterocyclic group, etc., and A2 represents C6-14 aryl, etc.