Maximal rectangle 3rd solution