The object of the present invention is to provide a compound useful for the prevention and treatment of viral infectious diseases, and particularly liver diseases caused by HCV infection due to its having a high degree of replication inhibitory activity against HCV, its production method, an intermediate compound useful for its production and a pharmaceutical composition containing these compounds, and the present invention relates to a compound represented by the formula (I):(wherein A represents -(CH2)n-, etc. B represents -(C=O)-, etc. D represents -(CH2)m-R, etc. E represents a hydrogen atom, etc. G represents -(CH2)p-J, etc. bond Q represents a single bond or double bond and R1, R2 and R3 may be the same or different and each represent a hydrogen atom, etc.), a prodrug thereof or a pharmaceutically acceptable salt thereof.