title: how to combine list of tuples based on common value into a list
body: <p>I have a long list of tuples, could look like this for example:</p>
  
  <pre><code>[('5','9'), ('10','11'), ('1','2'), ('1','3'), ('1','4'), ('2','7'), ('3','8'), ('2','1'), ('3','1'), ('3','4'), ('5','6'),  ('5','10'),  ('10','12'), ('11','13'), ('13','14')]
  </code></pre>
  
  <p>I need to combine them into lists if they share anything in common. So the output in the example would be:</p>
  
  <pre><code>['11', '10', '13', '12', '14', '5', '6', '9']
  ['1', '3', '2', '4', '7', '8']
  </code></pre>
  
  <p><strong>To clarify:</strong> the input is a list of tuples. I need to combine all tuples with shared element into one list. So if I will have: [('1','2'), ('1','3'), ('1','4'), ('4','5')], all the elements should all be put into one list ['1', '2', '3', '4', '5'], because they are linked through the tuples.</p>
  
  <p>I tried to come up with something going through dictionaries byt failed miserably. I am sure there some "easier" solution.</p>
  
  <p>thank you
  Martin</p>