Visual block training

You see the input. You see the output. Go.

Input

a
b
c
d
e
f
g

Output

a g a g a g a
b f b f b f b
c e c e c e c
d d d d d d d
e c e c e c e
f b f b f b f
g a g a g a g