Given an **NxN** matrix .In the given matrix, you have to print the **boundary elements** of the matrix.

```
Input : 1 2 3 4
5 6 7 8
1 2 3 4
5 6 7 8
Output : 1 2 3 4
5 8
1 4
5 6 7 8
```

**Input:**

First line consists of the input contains an intger **T** denoting the number of test cases. Then T test cases follow. First line of every test case consists of an integer **N**, denoting size of the Matrix. Second line of every test case consists of N x N spaced integers denoting elements of Matrix elements.

**Output:**

For each test case output a single line output, print the boundary elements of the matrix.

**Constraints:**

1<=T<=100

1<=N<=100

**Example:
Input:**

2

4

1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8

3

45 48 54 21 89 87 70 78 15

1 2 3 4 5 8 1 4 5 6 7 8

45 48 54 21 87 70 78 15

Ibrahim Nash | 79 |

Stark_Maverick | 77 |

Micky_Kt | 60 |

Lam Ngoc Pham | 58 |

Eduardo Feo | 58 |

Lam Ngoc Pham | 463 |

All Is Well | 399 |

Divvya Sinha | 374 |

Prateek Gole | 369 |

ioan | 323 |

akhayrutdinov | 3855 |

sanjay05 | 3366 |

Michael Riegger | 2028 |

Jasleen Kaur 2 | 2012 |

Quandray | 1965 |