Implemented buildMaxNode/3.