Solved in python

because mapping over in BigInteger was arduous