Reordering of groups