I have a list (in Python 3) like this:
[[\'A\', (8, \'B\')], [\'B\', (3, \'C\')], [\'C\', (8, \'D\'), (7, \'E\')], [\'D\', (2, \'F\'), (7, \'G\'), (2, \'H\')], [\