def bloc(S,i,j):

    r = []

    ligne = (i // 3) * 3

    colonne = (j // 3) * 3

    for l in  [ligne,ligne+1,ligne+2]:

        for c in [colonne,colonne+1,colonne+2]:

            if S[l][c] != 0:

                r.append(S[l][c])

    return r