Sorting history by output height