Question on tensor calculation in Reimannian geometry

Given a Riemannian manfiold $M$ with metric $g=(g_{i,j})$. Let $T=T_{A,B,C,\dots}^{a,b,c,\dots}$ be a tensor on $M$. I would like to compute for example $T_{A,B,C,\dots}^{a,n,c,\dots}g_{n,m}$. We know that we should sum this over $n$ and get another tensor, but where should I put the index $m$, $$T_{A,B,C,\dots,m}^{a,n,c,\dots} \ \ \text{or} \ \ \ T_{A,m,B,C,\dots}^{a,n,c,\dots}?$$ and why should it be so?

I have been confused by contraction of this kind of tensors. Thanks you for your help.

-

$$T_{ij} = g_{ik}T^{k}_{ \ \ \ j} =g_{jl}T_{i}^{ \ \ l}= g_{ik}g_{jl}T^{kl}$$