You are given a grid with $R$ rows (numbered $1$ through $R$) and $C$ columns (numbered $1$ through $C$). A cell in row $r$ and column $c$ is denoted by $(r, c)$. Two cells in the grid are adjacent if they have a common side. For each valid $i$ and $j$, there is a value $a_{i, j}$ written in cell $a_{i, j}$.
A cell in the grid is stable if the number of cells in the grid which are adjacent to this cell is strictly greater than the value written in this cell. The whole grid is stable if all cells in the grid are stable.
Can you determine whether the grid is stable?

-----Input-----
- The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.
- The first line of each test case contains two space-separated integers $R$ and $C$.
- $R$ lines follow. For each $i$ ($1 \le i \le R$), the $i$-th of these lines contains $C$ space-separated integers $a_{i, 1}, a_{i, 2}, \ldots, a_{i, C}$.

-----Output-----
For each test case, print a single line containing the string "Stable" if the grid is stable or "Unstable" if it is unstable (without quotes).

-----Constraints-----
- $1 \le T \le 3,000$
- $3 \le R, C \le 10$
- $0 \le a_{i, j} \le 4$ for each valid $i, j$

-----Example Input-----
2
3 3
1 2 1
2 3 2
1 2 1
3 4
0 0 0 0
0 0 0 0
0 0 4 0

-----Example Output-----
Stable
Unstable

-----Explanation-----
Example case 1: Each cell of the grid is stable, so the grid is stable.
Example case 2: The cell in row $3$ and column $3$ is unstable since the number of cells adjacent to this cell is $3$.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 't = int(input())\n\ndef numOfCordinates(arr, raw_arr, r, c):\n num = 0\n possibleCords = [[r-1, c], [r+1,c], [r, c+1], [r, c-1]]\n \n for cords in possibleCords:\n  if cords in raw_arr:\n   num+=1\n \n return num\n \n\nfor _ in range(1,t + 1):\n \n (r,c) = map(int, input().split(" "))\n \n arr = []\n for i in range(r):\n  ri = list(map(int, input().split(" ")))[:c]\n  arr.append(ri)\n \n\n raw_arr = []\n for ri in range(r):\n  \n  for ci in range(c):\n   raw_arr.append([ri,ci])\n  \n\n for r in range(len(arr)):\n  \n  for c in range(len(arr[r])):\n   no_cords = numOfCordinates(arr, raw_arr, r, c) \n   \n   if no_cords == -1:\n    arr[r][c] = -1\n   \n   elif arr[r][c] < no_cords:\n    arr[r][c] = 0\n   \n   else:\n    arr[r][c] = -1\n \n \n s = 0\n for ls in arr:\n  s += sum(ls)\n  \n if s==0:\n  print("Stable")\n else:\n  print("Unstable")'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13567