SurveyMonkey Interview Question

print a matrix as the given printout order.