Compounds of the formula I: or pharmaceutically acceptable salts thereof, wherein m, n, p, q, r, A, W, X1, X2, X3, X4, Y, Z, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11 and R12 are as defined herein. Also disclosed are methods of making the compounds and using the compounds for treatment of inflammatory diseases such as arthritis.本發明係關於一種式I化合物:或其醫藥學上可接受之鹽,其中m、n、p、q、r、A、W、X1、X2、X3、X4、Y、Z、R1、R2、R3、R4、R5、R6、R7、R8、R9、R10、R11及R12係如本文中所定義。亦揭示製備該等化合物之方法及使用該等化合物治療發炎性疾病(諸如關節炎)之方法。