Company: CodeSignal
Difficulty: easy
Rhombic Cipher A message is stored as a table of r rows and c columns of lowercase letters, where r is even . The rhombic cipher rewrites the table in two steps. Step 1 — read the letters out. Walk the columns from left to right. Inside a column, first take the letters of the odd-indexed rows from top to bottom (rows 1, 3, 5, ... ), then the letters of the even-indexed rows from top to bottom (rows 0, 2, 4, ... ). Row indices are 0-based. Appending what every column contributes, in column order, gives one linear sequence of r * c letters. Step 2 — write the letters back. Fill a fresh table, again r rows by c columns, with that sequence: the first c letters become the first row (left to right), the next c letters the second row, and so on until the sequence is used up. Print the fresh table. Input Format The first line contains two integers r and c — the number of rows and columns. r is even. Each of the next r lines contains c single-character tokens separated by single spaces — one ro