Liftoff interview question

Print a matrix in the given pattern.