Paragraph breaks

Swap the blank lines and the aaa lines.

Input

aa
a
aaa

aa
a
aaa

aa
a
aaa

aa
a

Output

aa
a

aaa
aa
a

aaa
aa
a

aaa
aa
a