Change to output in priority order.