Disclosed is a novel compound that acts as an antagonist for P2X3 and/or P2X2/3 receptors. Also disclosed is a pharmaceutical composition that exhibits analgesic activity or acts to ameliorate urinary problems, said composition containing: a compound represented by formula (I), a pharmacologically permitted salt thereof, or a solvate of either. In the formula, Rh and Rj together form a bond; Ra and Rb, and/or Rd and Re, together form an oxo or the like; Rc represents hydrogen, a substituted or unsubstituted alkyl, or the like; -Rf represents -(CR4aR4b) n -R2; R4a and R4b represent hydrogen, a substituted or unsubstituted alkyl, or the like; R2 represents a substituted or unsubstituted cycloalkyl or the like; n represents an integer from 1 to 4; -Rg represents -X-R3; -X- represents -O-, -S-, or the like; and R3 represents a substituted or unsubstituted cycloalkyl or the like.