Re-arrange lines order.