# -*- coding: utf-8 -*-


class Solution(object):
    def closedIsland(self, grid):
        """
        :type grid: List[List[int]]
        :rtype: int
        """
        if not grid:
            return 
        
        rows = len(grid)
        cols = len(grid[0])
        
0bd7c1f28be683f4fe3ef4bd208f236ef51cb265
<mask token>

class Solution(object):
    <mask token>

class Solution(object):

    def closedIsland(self, grid):
        """
        :type grid: List[List[int]]
        :rtype: int
        """
        if not grid:
            return
        rows = len(grid)
        cols = len(grid[0])

# -*- coding: utf-8 -*-


class Solution(object):
    def closedIsland(self, grid):
        """
        :type grid: List[List[int]]
        :rtype: int
        """
        if not grid:
            return 
        
        rows = len(grid)
        cols = len(grid[0])
        