<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[12pt]{article}

\usepackage{qtree}

\begin{document}
\Tree [.{Number of Ways}
          [.N [.N [.N [NNN ]] [.D [NND ]]] 
              [.D [.N [NDN ]] [.D [NDD ]]]] 
          [.D [.N [.N [DNN ]] [.D [DND ]]]
              [.D [.N [DDN ]] [.D [DDD ]]]]]
\end{document}</pre></body></html>