Bloomberg Interview Question

Given a 2D matrix, print all the elements one diagonal at a time.