Provided is a novel compound which has D3 receptor antagonism. A compound represented by formula (IA)' (wherein: A represents S or O; R1a represents optionally substituted alkyloxy, etc.; R2a to R2d independently represent a hydrogen atom, etc.; ring B represents a 4- to 8-membered non-aromatic carbon ring, etc.; R3s independently represent a halogen, etc.; r is an integer of 0-4; and R4 represents an optionally substituted aromatic heterocyclic group, etc.) or a pharmaceutically acceptable salt thereof.