title: Independent cycles in permutation
body: <p>I have problems creating a function that takes permutation as an input and prints out independent cycles(in cycle notation).
  I will appreciate any help.</p>
  
  <p>Input:</p>
  
  <pre><code>1 2 3 4 5 6             
          5 3 2 6 4 1
  </code></pre>
  
  <p>Output:</p>
  
  <p><code>(1 5 4 6)(2 3)</code></p>