First joint from the start is supposed to rotate in clockwise and anticlockwise direction. And second joint is supposed to rotate in up and down direction. The end is with gripper which can be easy to move front and back. Gripper can also be a human hand structure.