Your table is the pivot table on the right side. If you have your data in this form like your table in the word-doc, you don't need the hierachry in the script.

The hierarchy you need, if yor table looks like the first inline-table, where only the direct neigbours are one row, for example DL - Stationary. The next row is Stationary - Marker, the next one is Stationary - Pen, the next one is Stationary - Notepad, and so on.