#K64702. Decipher Multiplex Message

    ID: 32034 Type: Default 1000ms 256MiB

Decipher Multiplex Message

Decipher Multiplex Message

You are given a grid of characters with dimensions r rows and c columns. The grid is provided as r strings, each consisting of exactly c characters. Your task is to decipher the multiplex message by reading the characters row by row (from top to bottom) and concatenating them.

Formally, if the grid is represented as \(G = [g_{0}, g_{1}, ..., g_{r-1}]\) where each \(g_{i}\) is a string of length \(c\), then the output is:

\(\text{message} = g_{0} + g_{1} + \cdots + g_{r-1}\)

Input will be provided from stdin and the output should be printed to stdout.

inputFormat

The first line contains two integers r and c, representing the number of rows and columns respectively. The following r lines each contain a string of length c consisting of characters.

For example:

4 5
hgowo
eotpl
lqcub
hyasd

outputFormat

Output a single line containing the deciphered message obtained by concatenating the given rows.

For the example above, the output should be:

hgowoeotpllqcubhyasd
## sample
4 5
hgowo
eotpl
lqcub
hyasd
hgowoeotpllqcubhyasd