Disclosed is a novel compound that acts as an antagonist for P2X3 and/or P2X2/3 receptors. Also disclosed is a pharmaceutical composition that acts as an antagonist for P2X3 and/or P2X2/3 receptors, said composition containing: a compound represented by formula (I), a pharmacologically permitted salt thereof, or a solvate of either. In the formula, ring A represents a substituted or unsubstituted five-to-seven-membered cycloalkane, a substituted or unsubstituted five-to-seven-membered cycloalkene, or the like; C represents a carbon atom; -X- represents -N(R16)- or the like; R16 represents hydrogen, a substituted or unsubstituted alkyl, or the like; R7 represents a substituted or unsubstituted five- or six-membered heteroaryl or a substituted or unsubstituted six-to-ten-membered aryl; each of Q1 and Q2 independently represents a carbon atom or a nitrogen atom; -L- represents -O-, -S-, or the like; R6 represents a substituted or unsubstituted cycloalkyl, a substituted or unsubstituted cycloalkenyl, or the like; and R2 represents hydrogen, hydroxyl, or the like.