Tracxn interview question

Print a pattern.