def findSolution(self, customfunction: 'CustomFunction', z: int) -> List[List[int]]:
    ans = []
    y = 1000
    for x in range(1, 1001):
        while (y > 0):
            t = customfunction.f(x, y)
            if (t == z):
                ans.append([x, y])
                break
            elif (t > z):
                y -= 1
            else:
                break
    return ans
def findSolution(self, customfunction: 'CustomFunction', z: int) -> List[List[int]]:
    ans = []
    y = 1000
    for x in range(1, 1001):
        while (y > 0):
            t = customfunction.f(x, y)
            if (t == z):
                ans.append([x, y])
                break
            elif (t > z):
                y -= 1
            else:
                break
    return ans