Absolute Permutation Hackerrank Solution In Python Input