**Compilation/Execution Result:**

Given a matrix A and a matrix B, their **Kronecker product** C = A tensor B, also called their matrix direct product, is an matrix.

A tensor B = |a_{11}B a_{12}B| |a_{11}b_{11} a_{11}b_{12} a_{12}b_{11} a_{12}b_{12}|

|a_{21}B a_{22}B| = |a_{11}b_{21} a_{11}b_{22} a_{12}b_{21} a_{12}b_{22}|

|a_{11}b_{31} a_{11}b_{32} a_{12}b_{31} a_{12}b_{32}|

|a_{21}b_{11} a_{21}b_{12} a_{22}b_{11} a_{22}b_{12}|

|a_{21}b_{21} a_{21}b_{22} a_{22}b_{21} a_{22}b_{22}|

|a_{21}b_{31} a_{21}b_{32} a_{22}b_{31} a_{22}b_{32}|

**INPUT:** The first line consists of an integer T i.e. the number of test cases. The first line of each test case contains Four Integer m, n, p, q denoting the size of the Matrix. Here (m, n ) denoting the size of first and (p, q ) denoting the size of the second matrix. Next **m** lines contain **n** integers separated by space and another **P** lines contain **q **integers also separated by space.

**OUTPUT: **For each test case in a new line output will be the space-separated values of the matrix C[][].

**Constraints:**

1<=T<=50

1 <= m , n , p , q <= 20

1<= A[i][j] , B[i][j] <= 100

**Example:**

**Input : ** 1
2 2 2 2
1 2
3 4
0 5
6 7
**Output: ** 0 5 0 10
6 7 12 14
0 15 0 20
18 21 24 28

Pulkit Gupta 2 | 114 |

nancygarg258_pec | 90 |

Little Noah | 84 |

rs119574 | 82 |

Relentless | 81 |

Ibrahim Nash | 580 |

KartikAgarwal | 541 |

rs119574 | 371 |

surbhi_7 | 356 |

Little Noah | 333 |

akhayrutdinov | 4261 |

sanjay05 | 3633 |

Ibrahim Nash | 3140 |

Quandray | 3028 |

Michael Riegger | 2359 |