Given a matrix a of size \(n \cdot n\) (\(1 <= n <= 1000\), \(1 <= a_i <= 10^9\)). Also given are m (\(1 <= m <= 1000\)) queries of the form x_{1< /sub>}, y_{1}, x_{2}, y_{2 } (\(1 <= x_1 <= n\), \(1 <= y_1 <= n\), \(x_1 <= x_2 <= n\), \(y_1 <= y_2 <= n\)).

For each query, output the maximum element in the submatrix with edge coordinates x_{1}, y_{1 }and_{ }x_{2}, y< sub>2.