Every college has a stud−max$stud-max$ buoy. JGEC$JGEC$ has its own Atul$Atul$ who loves to impress everyone with his smile. A presentation is going on at the auditorium where there are N$N$ rows of M$M$ chairs with people sitting on it. Everyone votes for Atul's presentation skills, but Atul is interested in knowing the maximum$maximum$ amount of vote that he receives either taking K$K$ people vertically$vertically$ or horizontally$horizontally$. Atul$Atul$, however, wants to finish up the presentation party soon, hence asks for your help so that he can wrap up things faster.  

-----Input:-----
- First line will contain T$T$, number of test cases. Then the test cases follow. 
- Each testcase contains of a single line of input, three integers N$N$, M$M$ and K$K$.  
- N lines follow, where every line contains M numbers$numbers$ denoting the size of the sugar cube

-----Output:-----
For each test case, output in a single line the maximum votes Atul can get. 

-----Constraints-----
- 1≤T≤$1 \leq T \leq $5
- 1≤N,M≤500$1 \leq N,M \leq 500$
- K≤min(N,M)$K \leq min(N,M)$ 
- 1≤numbers≤109$1 \leq numbers \leq 10^9$

-----Sample Input:-----
1
4 4 3 
1 4 5 7 
2 3 8 6
1 4 8 9 
5 1 5 6 

-----Sample Output:-----
22

-----EXPLANATION:-----
If Atul starts counting votes from (1,4), then he can take the 3 consecutive elements vertically downwards and those are 7,6 and 9 which is the maximum sum possible.

```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())\r\nfor z in range (t):\r\n\tn,m,k=list(map(int,input().split()))\r\n\ta=[([0]*m) for i in range (n)]\r\n\tfor i in range (n):\r\n\t\ta[i]=list(map(int,input().split()))\r\n\r\n\ts2=0\r\n\r\n\tfor i in range (n):\r\n\t\ts3=0\r\n\t\tco=0\r\n\t\tfor j in range (0,m):\r\n\t\t\tif(co==k):\r\n\t\t\t\ts3=s3+a[i][j]-a[i][j-k]\r\n\t\t\telse:\r\n\t\t\t\ts3=s3+a[i][j]\r\n\t\t\t\tco+=1\r\n\t\t\tif(s3>s2):\r\n\t\t\t\ts2=s3\r\n\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\ts3=0\r\n\ts4=0\r\n\tfor i in range (m):\r\n\t\ts3=0\r\n\t\tco=0\r\n\t\tfor j in range (0,n):\r\n\t\t\tif(co==k):\r\n\t\t\t\ts3=s3+a[j][i]-a[j-k][i]\r\n\t\t\telse:\r\n\t\t\t\ts3=s3+a[j][i]\r\n\t\t\t\tco+=1\r\n\t\t\tif(s3>s2):\r\n\t\t\t\ts2=s3\r\n\t\t\t\r\n\t\t\r\n\tprint(s2)\r\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13543