solve third_greatest challenge