The present invention provides a heterocyclic compound having a ROR γ t inhibitory action. The present invention relates to a compound represented by the formula (I): wherein each symbol is as defined in the specification. or a salt thereof.本發明提供一種具有ROR γ t抑制作用之雜環化合物。本發明係有關一種如式(I)代表之化合物或其鹽:其中各代號係如本說明書中之定義。