How to change CCNode's parent?

Hi, guys, I want to know how to change a CCNode’s parent, as bellows:
A is Child of B, and B is Child of C; I want change A to be Child of C, How to write the code ?

At first remove it from the current parent and then add to the new parent

Thanks very much.
Finally, as your suggestion, the code as follows:
A.retain();
B.removeChild(A, true);
C.addChild(A);