algorithm Archivi - Up-Climbing