Here is a code snippet that might help you out:
LOAD @1 as Data
(txt, codepage is 1252, no labels, delimiter is '\t', msq, filters(Transpose()));
FOR i=0 to (NoOfRows('tmp_Data')/2)-1
LOAD Peek('Data', ($(i)*2)+1, 'tmp_Data') as Hierarchy_UIC
, Peek('Data', $(i)*2, 'tmp_Data') as Hierarchy_UIC_Label
DROP Table tmp_Data;
Both the input file and an example QVW file are included for your pleasure.
I wasn't sure whether the hierarchy was fixed to 6 levels or not, this is why the TO expression is
Which for 12 entries (6 double entries) returns the value 5.
If you already know you want to stop at 12 entries max, then you can hardcode the valiue directly rather than use the calculated expression.