I am working on a problem, where I want to get all permutations, but cannot modify the print statement. Therefore, I can\'t use itertools or other packages.
itertools