Yes this is the second form, namely $$S^{abc}_{\quad def} T^{ghi}_{\quad jbk} = R^{acghi}_{\quad \ \ defjk}$$ This is so because in SageMath, the contravariant indices come always before the covariant ones.