#C10123. Decrypt the Message

    ID: 39294 Type: Default 1000ms 256MiB

Decrypt the Message

Decrypt the Message

You are given one or more test cases. For each test case, a grid of characters with dimensions \(R \times C\) is provided. Your task is to decrypt the message by reading each row in order and concatenating the characters into a single string.

Example: For a grid with 2 rows and 3 columns:
a B c
D e F
The decrypted message is aBcDeF.

Input Format: The first line contains an integer T denoting the number of test cases. Each test case starts with two integers R and C separated by a space, followed by R lines each containing a string of C characters. Output each decrypted message on a new line.

inputFormat

The first line contains an integer T, the number of test cases. For each test case:

  1. A line with two space-separated integers R and C, representing the number of rows and columns respectively.
  2. R lines follow, each containing a string of exactly C characters.

outputFormat

For each test case, output a single line with the decrypted message, which is formed by concatenating all characters of the grid in row-major order.## sample

1
2 3
aBc
DeF
aBcDeF

</p>