Disclosed are compounds of Formula (I) or a salt thereof, wherein: Ring A is 3- to 6-membered carbocyclic or heterocyclic ring; X is CR1 or N; Y is -(CR5R5)m-; Z is -(CR5R5)n-; and q, R1, R2, R3, R4, R6, R7, R8, R9, and R10 are defined herein. Also disclosed are methods of using such compounds as modulators of TNFa, and pharmaceutical compositions comprising such compounds. These compounds are useful in treating inflammatory and autoimmune diseases.