PROGRAMMING:Sparse matrix addition represented by triple order table
Sparse matrix addition represented by triple order table.
###Input format:
Input the number of rows m and columns n of the first row of two homomorphic matrices, the number of non-zero elements T1 of matrix A, and the number of non-zero elements T2 of matrix B.
Input the triple data of matrix A in the order of row priority, with a total of T1 rows, 3 numbers in each row, representing the row label, column label and value of non-zero elements respectively.
Input the data of matrix B triples in the order of row priority, with a total of T2 rows, 3 numbers in each row, representing the row label, column label and value of non-zero elements respectively.
###Output format:
After adding the first row, the number of rows m, the number of columns N and the number of non-zero elements t of the matrix are output.
Output the result of triple sequence table after adding t rows, output row label, column label and value of non-zero elements in each row, and separate data in each row with space.
###Input sample 1:
```in
4 4 3 4
0 1 -5
1 3 1
2 2 1
0 1 3
1 3 -1
3 0 5
3 3 7
```
###Output sample 1:
```out
4 4 4
0 1 -2
2 2 1
3 0 5
3 3 7
```
answer:If there is no answer, please comment
###Input format:
Input the number of rows m and columns n of the first row of two homomorphic matrices, the number of non-zero elements T1 of matrix A, and the number of non-zero elements T2 of matrix B.
Input the triple data of matrix A in the order of row priority, with a total of T1 rows, 3 numbers in each row, representing the row label, column label and value of non-zero elements respectively.
Input the data of matrix B triples in the order of row priority, with a total of T2 rows, 3 numbers in each row, representing the row label, column label and value of non-zero elements respectively.
###Output format:
After adding the first row, the number of rows m, the number of columns N and the number of non-zero elements t of the matrix are output.
Output the result of triple sequence table after adding t rows, output row label, column label and value of non-zero elements in each row, and separate data in each row with space.
###Input sample 1:
```in
4 4 3 4
0 1 -5
1 3 1
2 2 1
0 1 3
1 3 -1
3 0 5
3 3 7
```
###Output sample 1:
```out
4 4 4
0 1 -2
2 2 1
3 0 5
3 3 7
```
answer:If there is no answer, please comment