The present invention provides a novel compound having antagonism of P2X3 and/or P2X2/3 receptors.A pharmaceutical composition having analgesic effect or enhancement of Voiding dysfunction comprises the compound represented by formula (I):[in formula, Rh and Rj are together to form a bond; Ra and Rb and/or Rd and Re are together to form oxo group and the like; Rc is hydrogen, substituted or unsubstituted alkyl and the like; -Rf is -(CR4aR4b)n-R2; R4a and R4b are hydrogen, substituted or unsubstituted alkyl and the like; R2 is substituted or unsubstituted cycloalkyl and the like; n is an integer of 1~4; -Rg is -X-R3; -X- is -O-, -S- and the like; R3 is substituted or unsubstituted cycloalkyl and the like]; or pharmaceutically acceptable salts or solvates thereof.本發明提供新穎之具有P2X3及/或P2X2/3受體拮抗作用的化合物。一種具有鎮痛作用或排尿障礙改善作用之醫藥組成物,其含有式(I)所示之化合物:[式中,Rh及Rj一起形成鍵結;Ra與Rb及/或Rd與Re一起形成側氧基等;Rc為氫、經取代或非經取代之烷基等;-Rf為-(CR4aR4b)n-R2;R4a及R4b為氫、經取代或非經取代之烷基等;R2為經取代或非經取代之環烷基等;n為1~4之整數;-Rg為-X-R3;-X-為-O-、-S-等;R3為經取代或非經取代之環烷基等]或其製藥上可容許的鹽或彼等之溶劑合物。