comefrom: <garvit244>1275_1.py
code: def check(grid):
      for x in range(3):
          row = set([grid[x][0],grid[x][1],grid[x][2]])
          if len(row) == 1 and grid[x][0] != 0:
              return grid[x][0]
      
      for x in range(3):
          column = set([grid[0][x],grid[1][x],grid[2][x]])
          if len(column) == 1 and grid[0][x] != 0:
              return grid[0][x]
      
      diag1 = set([grid[0][0],grid[1][1],grid[2][2]])
      diag2 = set([grid[0][2],grid[1][1],grid[2][0]])
      if len(diag1) == 1 or len(diag2) == 1 and grid[1][1] != 0:
          return grid[1][1]
      
      return 0
masked: def sample_funcname ( var_0 ) :
      for var_3 in range ( 3 ) :
          var_8 = set ( [ var_0 [ var_3 ] [ 0 ] , var_0 [ var_3 ] [ 1 ] , var_0 [ var_3 ] [ 2 ] ] )
          if len ( var_8 ) == 1 and var_0 [ var_3 ] [ 0 ] != 0 :
              return var_0 [ var_3 ] [ 0 ]
      for var_3 in range ( 3 ) :
          var_10 = set ( [ var_0 [ 0 ] [ var_3 ] , var_0 [ 1 ] [ var_3 ] , var_0 [ 2 ] [ var_3 ] ] )
          if len ( var_10 ) == 1 and var_0 [ 0 ] [ var_3 ] != 0 :
              return var_0 [ 0 ] [ var_3 ]
      var_11 = set ( [ var_0 [ 0 ] [ 0 ] , var_0 [ 1 ] [ 1 ] , var_0 [ 2 ] [ 2 ] ] )
      var_12 = set ( [ var_0 [ 0 ] [ 2 ] , var_0 [ 1 ] [ 1 ] , var_0 [ 2 ] [ 0 ] ] )
      if len ( var_11 ) == 1 or len ( var_12 ) == 1 and var_0 [ 1 ] [ 1 ] != 0 :
          return var_0 [ 1 ] [ 1 ]
      return 0
  