Rearrange trains