import sys sys.setrecursionlimit(10000) def fact(n): if n == 0: return 0 return n * fact(n - 1) fact(9999)