I have a datatype that consists of multiple tuples in a list. It represents the relationship of parent-child. 

For example, `[('A', 1), ('A', 2, 1), ('A', 2, 2) ('A', 3), ('B', 1), ('B', 1, 1), ('B', 1, 2), ('C',)]` where the tuples can either have 1, 2, or three items with the format of (*letter, number, number*). In the above example, `('B', 1)` is the parent of `('B', 1, 1)` and `('B', 1, 2)`, and so on until we reach just a letter. 

My question is, how can I create a function that will receive something like the example above and create a nested list where the similar orders and letters/numbers will be grouped together. 

For instance, how do I create a function that will take something like:

```
[('A', 1), ('A', 2, 1), ('A', 2, 2), ('A', 3), ('B', 1), ('B', 1, 1), ('B', 1, 2), ('B', 2), ('B', 3), ('C',)]

```

and turn it into:

```
[[('A', 1), [('A', 2, 1), ('A', 2, 2)] ('A', 3)], [[('B', 1, 1), ('B', 1, 2)], ('B', 2), ('B', 3)], ('C',)]

```

Also note that the list will come presorted already in alphabetical and numerical order. Only the lowest order tuples are in the input list as well. (Parental tuples will not appear in the input list if their children are present)

Thanks!