Here I got a list of string:

```
['2-3-1-*-*','2-3-*-*-*','2-1-*-*-*','1-4-3-*-*','2-3-2-*-*','2-1-3-*-*','1-1-*-*-*','2-3-1-1-*'];

```

I am trying to group this string into a structure like this:

```
--'2-3-*-*-*' 
   --'2-3-1-*-*'
      --'2-3-1-1-*'
   --'2-3-2-*-*'
--'2-1-*-*-*'
   --'2-1-3-*-*'
--'1-4-3-*-*'
--'1-1-*-*-*'

```

This is like tree structure. I am beginner in programming, so can someone give me a hint on how can I construct the tree-like structure and any suitable structure that I could use?