Gapplet

Given a permutation, write it as a product of 2-cycles.

Input a permutation g 
e.g., (1,2,3,4)(6,7,8,9,10) or [5,4,3,2,6,1]
 
Write it as a product of 2-cycles