An integer N (1 ≤ N ≤ 6), an integer M (2 ≤ M ≤ 10^9), and an integer L (1 ≤ L ≤ 10^9).
A list of 2N-1 lists of non-negative integers, where each integer is smaller than M, representing some grid or matrix-like structure.

### Example Input:

```
3 3 1
1 0 0
0 0 0 0
0 0 0 0 0
0 0 0 0
0 0 1
```

### Function Signature:
Write a function f(inputs) that takes in the input.
def f(inputs: List[Tuple[int, int, int, List[List[int]]]]):
    '''
    inputs: a list of tuples, where each tuple contains an integer N, an integer M, an integer L, and a list of lists of integers
    '''