Perfect N-ary Tree