def solveit(test):
    """ test, a function that takes an int parameter and returns a Boolean
        Assumes there exists an int, x, such that test(x) is True
        Returns an int, x, with the smallest absolute value such that test(x) is True 
        In case of ties, return any one of them. 
    """
    x = 0
    if (test(0)):
        return 0
    while(not test(x)):
        x += 1
        if test(x):
            return x
        if test(-x):
            return -x