Insert the given keys into the initially empty red black tree. Do all the necessary balancing operations as well. If there are equal keys, they are always inserted into the right branch of the existing node.
The keys can be inserted by drag&dropping them from Stream of Keys into the tree below. If necessary, do the required balancing operations.
Balance the tree by selecting the node to be rotated, and press the correct rotation button. Or, select each node, which color should be changed, and press Toggle color button.
Note: if you haven't selected any node or the rotation is technically impossible, you'll get an error message. However, you can continue the exercise after this (from the current state of the tree).