Maximum Recursion Depth Python