Reconstruct a Text Rectangle from Diagonal Strips This challenge is inspired by a SO question about traversing a matrix by enumerating all its diagonal strips.

Instead of a matrix, consider a block of text:

ABCD
EFGH
IJKL


Traversing this block's SW-NE diagonals from left to right, starting from the top left corner and ending in the bottom right, results in the following output:

A
EB
IFC
JGD
KH
L


Challenge

Write a program or a function that execute the reverse of the process described above. That is, given a set SW-NE diagonal strips, output the block of text that produced it.

Input and Output

Both input and output can be represented as strings with newlines, or arrays/lists of strings.

Trailing newlines are optional.

The input will consist of at least one printable character and can be assumed to be correct (there will not be inconsistent row lengths). 

The output block will always have a number of columns greater than or equal to the number of rows.

Test Cases

Input:

A


Output:

A


Input:

.
LI
PO.
PV.
CE
G


Output:

.I..
LOVE
PPCG


Input:

M
DA
AIT
LAR
SGI
/OX
/N
/


Output:

MATRIX
DIAGON
ALS///
CJam, 23 20 bytes

{_z,,Nf*W%\.+zW%sN%}


Try it here.