Defined the constant MAXINT to handle sys.maxint or sys.maxsize depending on the python version