Permutation Game Hackerrank Solution For Python Syntax