Don't step on the Box!
```\n    def minPushBox(self, grid: List[List[str]]) -> int:\n        for i, row in enumerate(grid):\n            for j, col in enumerate(row):\n               
```\n    def minPushBox(self, grid: List[List[str]]) -> int:\n        for i, row in enumerate(grid):\n            for j, col in enumerate(row):\n                if col == \'S\':\n                    si,sj = i,j\n                elif col == \'B\':\n                    bi,bj = i,j\n                elif col == \'T\':\n                    ti,tj = i,j\n                    \n        H, W = len(grid), len(grid[0])\n        dirs = [(-1,0), (0, -1), (1,0),(0,1)]\n        def playerreach(standi, standj, pli, plj, nbi, nbj):\n            q = deque([(pli, plj)])\n            seenpr = set()\n            while q:\n                ppi, ppj = q.popleft()\n                \n                for di, dj in dirs:\n                    newpi, newpj = di + ppi, dj + ppj\n\t\t\t\t\t#Don\'t step on the Box!\n                    if 0 <= newpi < H and 0 <= newpj < W and grid[newpi][newpj] != \'#\' and (newpi, newpj) != (nbi, nbj):\n                        if (newpi, newpj) == (standi, standj):\n                            return True\n                        if (newpi, newpj) not in seenpr:\n                            seenpr.add((newpi, newpj))\n                            q.append((newpi, newpj))\n                            \n            return False\n        \n        seen = {(bi, bj, si, sj)}\n        \n        q = deque([(bi, bj, si, sj, 0)])\n        best = float(\'inf\')\n        while q:\n            bxi, bxj, pli, plj, pushes = q.popleft()\n            \n            for di, dj in dirs:\n                newi, newj = di + bxi, dj + bxj\n                \n                if 0 <= newi < H and 0 <= newj < W and grid[newi][newj] != \'#\':\n                    \n                    if (newi, newj, pli, plj) not in seen:\n                        seen.add((newi, newj, pli, plj))\n                        standi, standj = di*-1 + bxi, dj*-1 + bxj\n                        \n                        if playerreach(standi, standj, pli, plj, bxi, bxj):\n                            \n                            if (newi, newj) == (ti, tj):\n                                best = min(best, pushes+1)\n                            else:\n                                q.append((newi, newj, standi+di, standj+dj, pushes+1))\n                            \n                            \n        return -1 if best == float(\'inf\') else best
['Python']