Merging child nodes to get parent node . Since set is used , it will remove redundant digits .
for it in Tree [ 2 * idx ] : NEW_LINE INDENT Tree [ idx ] . add ( it ) NEW_LINE DEDENT for it in Tree [ 2 * idx + 1 ] : NEW_LINE INDENT Tree [ idx ] . add ( it ) NEW_LINE DEDENT