Dima and the Table
Dima received a special m×n table from his mom. In this table, Dima can select three numbers — i, j, and d (1 ≤ i ≤ n, 1 ≤ j ≤ m, -1000 ≤ d ≤ 1000) — and set the element at position (i, j) to d. As Dima plays with the table, his mom occasionally asks him to find the maximum element 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, representing the initial state of the table. Following these, there are q lines describing operations and queries. Each line begins with either = or ?. A line starting with = indicates an assignment operation, followed by i, j, and d, adhering to the constraints mentioned. A line starting with ? indicates a query, followed by 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 the queries, each on a separate line.