```
In [28]: S = Sum(F(i, j, k), (i, a, b), (j, c, d), (k, e, f))

In [29]: reorder(S, (k,j), (k,i), (j,i))
Out[29]: Sum(F(i, j, k), (k, e, f), (j, c, d), (i, a, b))
```