Modified solution of sort colors