Given a three-dimensional table of integers a_{i,j,t}, where 1 \leq i \leq n, 1 \leq j \leq m, 1 \leq t \leq k. For given , , , , , find

The first line contains the dimensions of the table: , , (1 \leq n, m, k \leq 100). Then blocks of lines follow, each containing integers a_{i,j,t} (1 \leq a_{i,j,t} \leq 1000). The blocks are separated by an empty line. The next line contains the integer (1 \leq q \leq 10^6) — the number of queries. Each of the next lines contains a query described by lx_i, ly_i, lz_i, rx_i, ry_i, rz_i (1 \leq lx_i \leq rx_i \leq n, 1 \leq ly_i \leq ry_i \leq m, 1 \leq lz_i \leq rz_i \leq k).
Print numbers, one per line, which are the answers to the queries.
Example 1