Given N - Ary tree
Node root = new Node ( 1 ) ; ( root . child ) . add ( new Node ( 2 ) ) ; ( root . child ) . add ( new Node ( 3 ) ) ; ( root . child . get ( 0 ) . child ) . add ( new Node ( 4 ) ) ; ( root . child . get ( 1 ) . child ) . add ( new Node ( 5 ) ) ; ( root . child . get ( 1 ) . child ) . add ( new Node ( 6 ) ) ; ( root . child . get ( 1 ) . child . get ( 1 ) . child ) . add ( new Node ( 7 ) ) ; ( root . child . get ( 1 ) . child . get ( 1 ) . child ) . add ( new Node ( 8 ) ) ;