Dima and the Table
Dima's mom gave him a special table with dimensions m×n. This table allows Dima to perform a unique operation: he can select three numbers — i, j, and d (1 ≤ i ≤ n, 1 ≤ j ≤ m, -1000 ≤ d ≤ 1000) — and add d to the element located at position (i, j). As Dima experiments with his table, his mom occasionally asks him to calculate the sum of all elements within a specific subregion of the table, defined by the indices from_row ≤ row ≤ to_row and from_column ≤ column ≤ to_column. While Dima can easily answer these questions, can you do the same?
Input
The first line contains three integers n, m, and q (1 ≤ n, m ≤ 1000, 1 ≤ q ≤ 10^5), representing the number of rows, columns, and the total number of operations and queries, respectively. The next n lines each contain m integers, each with an absolute value not exceeding 1000, which describe the initial state of the table. Following these, there are q lines detailing the operations and queries. Each line begins with either + or ?. A line starting with + indicates an addition operation, followed by i, j, and d, as previously described. A line starting with ? indicates a query, followed by the numbers from_row, to_row, from_column, and to_column (1 ≤ from_row ≤ to_row ≤ n, 1 ≤ from_column ≤ to_column ≤ n).
Output
Provide the answers to each query, one per line.