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係如本文中所定義。亦揭示製備該等化合物及使用該等化合物治療諸如關節炎等發炎性疾病之方法。