title: Reduce nested dictionary to "top-key-root-element" dictionary
body: <p>I would like to derive a dictionary from a nested dictionary with the top keys as keys and the root elements as values. This post is <a href="https://stackoverflow.com/questions/27755828/get-final-elements-of-nested-dictionary-in-python">similar to this one</a>, but I would like to end up with a dictionary not with a list of lists.</p>
  <p>Example: How to get from this</p>
  <pre><code>d = {'foo':{'a':{'b':['1','2']}},
       'bar':{'a':{'b':{'c':'3'}}}}
  </code></pre>
  <p>to this?</p>
  <p><code>{'foo': ['1', '2'], 'bar': '3'}</code></p>