Yardi Systems interview question

Write a program for printing patterns. (pattern given to me was quite hard)