'' Given N-Ary tree
vec = [ ] NEW_LINE root = Node ( 1 ) NEW_LINE root . child . append ( Node ( 2 ) ) NEW_LINE root . child . append ( Node ( 3 ) ) NEW_LINE root . child [ 0 ] . child . append ( Node ( 4 ) ) NEW_LINE root . child [ 1 ] . child . append ( Node ( 5 ) ) NEW_LINE root . child [ 1 ] . child . append ( Node ( 6 ) ) NEW_LINE root . child [ 1 ] . child [ 1 ] . child . append ( Node ( 7 ) ) NEW_LINE root . child [ 1 ] . child [ 1 ] . child . append ( Node ( 8 ) ) NEW_LINE