def solve(S,i,j):

    if i == 9:

        return ...

    elif S[i][j] > 0:

        ...

        return ...

    for k in possibles(S,i,j):

        S[i][j] = k

        ...

        if solve(S,a,b):

            return ...

    S[i][j] = 0

    return False