The present invention is related to a compound represented by the formula (I) or a pharmaceutically acceptable salt thereof (wherein X1, X2, X3, X4, X5, R5, R6, R7, R8, n, p, q, ring A and ring B have the same meanings as defnied in the specification).本發明係關於式(I):(式中,X1、X2、X3、X4、X5、R5、R6、R7、R8、n、p、q、環A、及環B係與說明書記載的定義同意義)所示之化合物或其製藥上可容許的鹽。