Absolute Permutation Hackerrank Solution For Python Syntax Rules