BNP Paribas interview question

Wap to print a pattern