title: how to select best combination of different lines
body: <p>A few time ago I started playing an old RPG I had was I was young.</p>
  <p>You have to make a group of 4 characters, each one having a value in the skill list from 0 (can't learn the skill) to 5 (Mastery of the skill).</p>
  <p>It looks a bit like this for example:</p>
  <pre><code>         Shield Sword Magic
  Knight     5      5     0
  Ranger     2      3     3
  Sorcerer   0      0     5
  </code></pre>
  <p>With of course many more skills and many more classes.</p>
  <p>So I thought about making a script that can test all classes combination and give me the 4 characters that give me the most mastery skills at the end.</p>
  <p>But I don't need 2 skills to be max out by 2 different characters, for example if sorcerer can get a 5 in magic, I don't necessarily need another char that can do it.</p>
  <p>My idea was to go on a some for loop which will compare all the values in the selected skill column for all the 4 heroes combinations, then proceed to the next one, etc...</p>
  <p>But I have no idea where to start and how to do it. Any ideas?</p>
  <p>Have a nice day all</p>