The code needs to print a newline character at the end of every row.

ALSO the }s are not in the correct columns.