Given an

matrix where each element
)
in the matrix is

initailly, you are asked to successively perform

groups of operations on the matrix.
For each group of operations, you are given six parameters

,

,

,

,

and

and need to do the following operations in order:
- Find the maximum element among
, denoted by
; - Find the maximum element among
, denoted by
; - Find the maximum element among
, denoted by
; - Find the maximum element among
, denoted by
; - Increase each element
by
; - Increase each element
by
; - Increase each element
by
; - Increase each element
by
.
After performing each group of operations, you need to output the values of

,

,

and

.
输入描述:
The first line contains an integer
, indicating the number of rows as well as columns in the matrix as well as the number of groups of operations.
Then follow
lines, each of which contains contains six integers
,
,
,
,
and
, indicating the parameters of a group of operations as described above.
输出描述:
For each operation, output a line containing four integers, indicating the values of
,
,
and
.
示例1
输入
复制
3
3 3 1 2 3 4
2 3 1 2 3 4
3 2 1 2 3 4