This paper presents an algorithm of motion planning of humanoid robot in order to climb vertical surfaces. Robots moving up walls or similarly rampant terrains have been analyzed and developed for a long time, we can see the many robot systems in real world scenarios for window cleaning and inspection applications. Previous researches were usually dedicated to climbing mechanisms with their locomotion and adhesion methods (magnetic, vacuum or suction cups), however, we introduce a more challenging scenario in this paper: A humanoid robot is designed to climb up a climbing wall totally autonomously. Robots are generally expected to assist human lives, and this kind of humanoid climbing robots are expected to be useful to rescue in disaster area. A special algorithm is developed to find the best route to climb up walls at each instant hold coordinate. The presented algorithm is a kind of graph algorithm on clustering, and it can analyze whether target holds are useful or not. The algorithm takes into account the specific abilities of the robot, and it is labeled "Right Hand Search Algorithm' (RHSA). Finally, we apply this algorithm to solve a simple practical example and simulate a basic scenario in the real environment for our humanoid climbing robot.