abg outside grandchild (left childcinside grandchild (right childdg inside grandchild (left childfigure outside grandchild (right childhanded variations of node being inserted the action we take to restore the red-black rules is determined by the colors and configuration of and its relatives perhaps surprisinglynodes can be arranged in only three major ways (not counting the handed variations already mentionedeach possibility must be dealt with in different way to preserve red-black correctness and thereby lead to balanced tree we'll list the three possibilities briefly and then discuss each one in detail in its own section figure shows what they look like remember that is always red is black is red and is an outside grandchild of is red and is an inside grandchild of you might think that this list doesn' cover all the possibilities we'll return to this question after we've explored these three