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.